22 条题解

  • 0
    @ 2025-9-20 15:20:14
    #include<bits/stdc++.h>
    using namespace std;
    int n,k;
    int f(int n,int t)
    {
        int s=0;
        while (n)
        {
            s+=n%t;
            n/=t;
        }
        return s;
    }
    int main()
    {
        cin>>n;
        while (n--)
        {
            cin>>k;
            if (f(k,16)==f(k,12)&&f(k,12)==f(k,10)) cout<<k<<" is a Sky Number.";
            else cout<<k<<" is not a Sky Number.";cout<<'\n';
        }
    }
    

    信息

    ID
    104
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    递交数
    173
    已通过
    57
    上传者