已AC代码:
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
int t;
scanf("%d", &t);
while(t--)
{
char num[15], s[15];
char a[10]={'O','O','T','T', 'F','F','S','S','E','N'};
scanf("%s", num);
int n=strlen(num)-1;
for(int i=n; i>=0; i--)
s[n-i] = a[num[i]-'0'];
s[n+1] = '\0';
printf("%s\n", s);
}
return 0;
}