結果
問題 | No.227 簡単ポーカー |
ユーザー | zect518 |
提出日時 | 2018-05-27 06:49:25 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 513 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 25,472 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-11 03:48:43 |
合計ジャッジ時間 | 922 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 2 ms
4,376 KB |
testcase_05 | AC | 2 ms
4,380 KB |
testcase_06 | AC | 1 ms
4,376 KB |
testcase_07 | AC | 2 ms
4,380 KB |
testcase_08 | AC | 1 ms
4,376 KB |
testcase_09 | AC | 1 ms
4,380 KB |
testcase_10 | AC | 2 ms
4,380 KB |
testcase_11 | AC | 1 ms
4,376 KB |
testcase_12 | AC | 1 ms
4,380 KB |
testcase_13 | AC | 2 ms
4,380 KB |
ソースコード
#include<stdio.h> 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++){ 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"); } }