输入样例:
8
kamusta_po
genki_desu
ohayou_gozaimasu
annyeong_hashimnida
hajime_no_ippo
bensamu_no_sentou_houhou_ga_okama_kenpo
ang_halaman_doon_ay_sarisari_singkamasu
si_roy_mustang_ay_namamasu
输出样例:
FILIPINO
JAPANESE
JAPANESE
KOREAN
FILIPINO
FILIPINO
JAPANESE
JAPANESE
难度:简单 |
时/空限制:1s / 256MB |
总通过数:1705 |
总尝试数:2470 |
来源:AcWing,第64场周赛 |
算法标签 |
#include <bits/stdc++.h>
#define LL long long
using namespace std;
const int maxn = 1e6 + 10;
const int mod = 1e9 + 7;
const int INF = 1e9 + 10;
const int N = 1e6;
int n;
int main(){
cin >> n;
while(n--){
string s;
cin >> s;
int len = s.length();
if(s[len - 1] == 'o')
cout << "FILIPINO" << endl;
else if(s[len - 1] == 'u')
cout << "JAPANESE" << endl;
else
cout << "KOREAN" << endl;
}
system("pause");
return 0;
}
版权声明:本文为Recursions原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。