1 solutions

  • 0
    @ 2026-8-26 21:44:17
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int a;
        cin>>a;
        for(int i=1;i<=a;i++)
        {
            int n;
            cin>>n;
            int s=0;
            int j=n;
            while(j)
            {
                s+=j%10;
                j/=10;
            }
            if(s%7==0){
                cout<<"Yes";
            }
            else{
                cout<<"No";
            }
            cout<<endl;
        }
        return 0;
    }

    Information

    ID
    2195
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    7
    Tags
    # Submissions
    83
    Accepted
    21
    Uploaded By