[codeforces 1281A] Suffix Three
总目录详见https://blog.csdn.net/mrcrack/article/details/103564004
在线测评地址http://codeforces.com/problemset/problem/1281/A
Problem | Lang | Verdict | Time | Memory |
---|---|---|---|---|
A - Suffix Three | GNU C++11 | Accepted | 31 ms | 0 KB |
#include <stdio.h>
#include <string.h>
char S[1010];
int main(){
int t,len;
scanf("%d",&t);
while(t--){
scanf("%s",S+1);
len=strlen(S+1);
if(S[len-1]=='p'&&S[len]=='o')printf("FILIPINO\n");
else if(S[len-1]=='d'&&S[len]=='a')printf("KOREAN\n");
else printf("JAPANESE\n");
}
return 0;
}