結果

問題 No.227 簡単ポーカー
ユーザー utsumidaisukeutsumidaisuke
提出日時 2017-03-10 23:50:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 543 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 10,916 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-09-06 14:40:59
合計ジャッジ時間 872 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,800 KB
testcase_01 AC 14 ms
7,940 KB
testcase_02 AC 14 ms
7,812 KB
testcase_03 AC 12 ms
7,860 KB
testcase_04 AC 13 ms
7,812 KB
testcase_05 AC 12 ms
7,796 KB
testcase_06 AC 12 ms
7,796 KB
testcase_07 AC 12 ms
7,820 KB
testcase_08 AC 12 ms
7,764 KB
testcase_09 AC 12 ms
7,736 KB
testcase_10 AC 13 ms
7,716 KB
testcase_11 AC 12 ms
7,852 KB
testcase_12 AC 13 ms
7,832 KB
testcase_13 AC 13 ms
7,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

card = input().split()
card_set = set(card)


if len(card_set) == 5 or len(card_set) == 1:
    print('NO HAND')
elif len(card_set) == 4:
    print('ONE PAIR')
elif len(card_set) == 3:
    mx1 = 0
    for i in card_set:
        n = card.count(i)
        mx1 = max(mx1, n)
    if mx1 == 3:
        print('THREE CARD')
    else:
        print('TWO PAIR')
elif len(card_set) == 2:
    mx2 = 0
    for i in card_set:
        n = card.count(i)
        mx2 = max(mx2, n)
    if mx2 == 4:
        print('NO HAND')
    else:
        print('FULL HOUSE')
0