#include int main(){ int count=0,match2=0,match3=0,i,s; int card[5]; setvbuf(stdout,NULL,_IONBF,0); for(i=0;i<5;i++){ printf("入力"); scanf("%d",&card[i]); } for(i=0;i<5;i++){count=0; for(s=0;s<5;s++){ if(card[i]==card[s])count++; } if(count==2)match2++; if(count==3)match3++; } switch(match2){ case 4: printf("TWO PAIR"); break; case 2: if(match3==3)printf("FULL HOUSE"); else printf("ONE PAIR"); break; case 0: if(match3==3)printf("THREE CARD"); else printf("NO HAND"); } }