wa求调
查看原帖
wa求调
1471251
zjx1203楼主2024/11/20 17:09
#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,s=0,u=0,e,y;
	cin>>a;
	for(int i=1;i<=a;i++){
		cin>>b;
		s=0;
		e=b;
		y=b;
		u=0;
		while(b){
			u++;
			b=b/10;
		}
		while(e){
			s=s+pow(e%10,u);
			e/=10;
		}
		if(s==y) cout<<"T";
		else cout<<"F";
	}
	return 0;
}
2024/11/20 17:09
加载中...