#include #include #include #include int main(void) { int card; int cardcnt[15]={0}; bool IsCompleteHand=false; for(int i=0;i<5;i++) { scanf("%d",&card); cardcnt[card]++; } for(int i=1;i<=13;i++) { if(cardcnt[i]==3) { for(int j=1;j<=13;j++) { if(cardcnt[j]==2) { printf("FULL HOUSE"); IsCompleteHand=true; } } if(IsCompleteHand==false) { printf("THREE CARD"); IsCompleteHand=true; } } } if(IsCompleteHand==false) { for(int i=1;i<=13;i++) { if(cardcnt[i]==2) { for(int j=1;j<=13;j++) { if(cardcnt[j]==2) { printf("TWO PAIR"); IsCompleteHand=true; } } if(IsCompleteHand==false) { printf("ONE PAIR"); IsCompleteHand=true; } } } } if(IsCompleteHand==false) { printf("NO HAND"); } }