1 条题解

  • 1
    @ 2026-8-30 16:48:46
    #include <bits/stdc++.h>//请叫我PRO
    using namespace std;//awa
    int main() {
        int M;
        cin >> M;
        for (int i = 0; i < M; i++) {
            int n;
            cin >> n;
            int temp = n, digits = 0;
            while (temp > 0) { 
                temp /= 10;
                digits++;
            }
            temp = n;
            int sum = 0;
            while (temp > 0) { 
                int d = temp % 10;
                sum += pow(d, digits);
                temp /= 10;
            }
            if (sum == n)
                cout << "T" << endl;
            else
                cout << "F" << endl;
        }
        return 0;
    

    信息

    ID
    9
    时间
    1000ms
    内存
    512MiB
    难度
    10
    标签
    递交数
    3
    已通过
    2
    上传者