結果

問題 No.227 簡単ポーカー
ユーザー 👑 yumechiyumechi
提出日時 2015-09-23 06:07:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 5,000 ms
コード長 394 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 71,472 KB
最終ジャッジ日時 2023-09-26 14:34:42
合計ジャッジ時間 2,592 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,036 KB
testcase_01 AC 76 ms
71,028 KB
testcase_02 AC 76 ms
71,152 KB
testcase_03 AC 75 ms
71,184 KB
testcase_04 AC 74 ms
71,472 KB
testcase_05 AC 75 ms
71,204 KB
testcase_06 AC 75 ms
71,468 KB
testcase_07 AC 75 ms
71,180 KB
testcase_08 AC 74 ms
71,380 KB
testcase_09 AC 73 ms
71,176 KB
testcase_10 AC 75 ms
71,416 KB
testcase_11 AC 74 ms
71,332 KB
testcase_12 AC 74 ms
71,404 KB
testcase_13 AC 76 ms
71,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

li = list(map(int, input().split()))
dic = dict([])
for i in li:
    if i in dic:
        dic[i] += 1
    else:
        dic.update({i:1})

twop = 0
threec = 0
for v in dic.values():
    if v == 2:
        twop += 1
    if v == 3:
        threec += 1

if threec == 1:
    print("FULL HOUSE" if twop == 1 else "THREE CARD")
else:
    ans = ["NO HAND", "ONE PAIR", "TWO PAIR"]
    print(ans[twop])
0