#include using namespace std; int a[14]; int main() { for(int i=0; i<5; i++) { int x; cin >> x; a[x]++; } int three=0, two=0, one=0; for(int i=1; i<14; i++) if(a[i]==1) one++; else if(a[i]==2) two++; else if(a[i]==3) three++; if(three==1 && two==1) cout << "FULL HOUSE" << endl; //ある数をちょうど3つと、別の数をちょうど2つ含む。 else if(three==1 && one==2) cout << "THREE CARD" << endl; //ある数をちょうど3つ含む。 else if(two==2) cout << "TWO PAIR" << endl; //ある数をちょうど2つと、別の数をちょうど2つ含む。 else if (two==1 && three==0) cout << "ONE PAIR" << endl; //ある数をちょうど2つ含む。 else cout << "NO HANDS" << endl; return 0; }