1 solutions

  • 1
    @ 2025-8-13 15:18:31
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n,k=0;
    	cin>>n;
    	for(int i=1;i<=n;i++){
    		int x;
    		cin>>x;
    		int t=x;
    		int k=0;
    		while(t){
    			int g=t%10;
    			k+=g;
                t/=10;
    		}
    		if(k%7==0){
    		cout<<"Yes"<<endl;
    	}
    		else cout<<"No"<<endl;
    	}
    
    	return 0;
    }
    
    
    

    Information

    ID
    2195
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    8
    Tags
    # Submissions
    24
    Accepted
    6
    Uploaded By