1 条题解

  • 0
    @ 2025-11-30 16:24:25

    C++ :

    #include <iostream>
    #include <cmath>
    using namespace std;
    
    int main() {
        int M, num;
        cin >> M;
        while (M--) {
            cin >> num;
            int n=0, t=num, s=0;
            while (t) { t/=10; n++; }
            t=num;
            while (t) { s+=pow(t%10,n); t/=10; }
            cout << (s==num?"T\n":"F\n");
        }
    }
        
    
    • 1

    信息

    ID
    806
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者