题解
2025-11-23 17:25:50
发布于:上海
0阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
int temp;
cin>>temp;
int temp1=temp;
int cnt=0;
while(temp1){
cnt++;
temp1/=10;
}
int temp2=temp;
int sum=0;
while(temp2){
sum+=pow(temp2%10,cnt);
temp2/=10;
}
if(sum==temp){
cout<<"T"<<endl;
}else{
cout<<"F"<<endl;
}
}
}
这里空空如也





有帮助,赞一个