小脑萎缩,大脑爆炸,听取WA声
查看原帖
小脑萎缩,大脑爆炸,听取WA声
1070628
nyk1315楼主2024/5/25 14:14
#include<bits/stdc++.h>
using namespace std;
int main(){
	int t,a;
	cin>>t;
	for(int i=1;i<=t;i++){
		cin>>a;
		int c=a,a1,p=0;
		while(c==0)
			c/=10,p++;
		c=a,a1=0;
		while(c==0)
			a1+=pow(p,c%10),c/=10;
		if(a1==a)
			cout<<'T'<<endl;
		else
			cout<<'F'<<endl;
	}
	return 0;
}
2024/5/25 14:14
加载中...