1 solutions

  • 0
    @ 2025-11-27 11:55:05

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    int n;
    cin>>n;
    int ans=0;
    for(int i=1;i<=n;i++){
    int x;
    cin>>x;
    int tot=0;
    while(x){
    tot+=(x%10);
    x/=10;
    }
    if(tot%7==0)cout<<"Yes\n";
    else cout<<"No\n";
    }
    return 0;
    }
    
    • 1

    Information

    ID
    32
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By