This commit is contained in:
HuangHai
2025-08-30 18:35:01 +08:00
commit 1f397eca87
6258 changed files with 1487241 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#include <bits/stdc++.h>
using namespace std;
bool check(int x) {
int len = to_string(x).size();
int sum = 0, t = x;
while (t) {
int a = t % 10;
sum += pow(a, len);
t /= 10;
}
return x == sum;
}
int main() {
int T;
cin >> T;//times
while (T--) {
int a;
cin >> a;
if (check(a))
cout << 'T' << endl;
else
cout << 'F' << endl;
}
return 0;
}