题解
2025-07-30 22:39:39
发布于:山东
2阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main (){
int n,t,x,b;
cin>>n;
long long a;
for(int i=1;i<=n;i++){
cin>>a;
b=0;
while(a){
t=a%10*7;
while(t>9){
x=0;
while(t){
x+=t%10;
t/=10;
}
t=x;
}
b+=t;
b+=a/10%10;
a/=100;
}
if(b%8==0) cout<<"T"<<endl;
else cout<<"F"<<endl;
}
return 0;
}
这里空空如也
有帮助,赞一个