結果
問題 | No.227 簡単ポーカー |
ユーザー |
![]() |
提出日時 | 2015-07-26 17:01:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 399 bytes |
コンパイル時間 | 409 ms |
コンパイル使用メモリ | 53,848 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-08 14:08:10 |
合計ジャッジ時間 | 1,049 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#include <iostream> using namespace std; int main() { int cnt[14] = {}; for(int i=0; i<5; i++) { int a; cin >> a; cnt[a] ++; } int th = 0, tw = 0; for(int i=0; i<14; i++) { tw += cnt[i] == 2; th += cnt[i] == 3; } if(th == 1 && tw == 1) puts("FULL HOUSE"); else if(th == 1) puts("THREE CARD"); else if(tw == 2) puts("TWO PAIR"); else if(tw == 1) puts("ONE PAIR"); else puts("NO HAND"); return 0; }