题解
2026-01-28 18:26:43
发布于:辽宁
2阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, c, d, e, f;//组数,本数,附用,附用,累加,位数
cin >> a;
for(int i=1; i<=a; i++){
e = f = 0;//初始化
cin >> b;
d = c = b;//给附用赋值
while(b != 0){
f++;
b /= 10;
}
while(c != 0){
e += pow(c % 10, f);
c /= 10;
}
if(d == e){
cout << "T" << endl;
}
else{
cout << "F" << endl;
}
}
return 0;
}
这里空空如也



有帮助,赞一个