#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
while (n--) {
string m;
cin >> m;
int s = 0;
for (int i = m.length() - 1, pos = 1; i >= 0; i--, pos++) {
int a = m[i] - '0';
if (pos % 2 == 1) {
a *= 7;
while (a > 9)
a = a / 10 + a % 10;
}
s += a;
}
cout << (s % 8 ? 'F' : 'T') << endl;
}
return 0;
}
全部回复 共 0 条
还没有人回复。往下写第一条。
发表回复
登录后即可回复本帖,与出题人和同学一起讨论。
登录