結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー Yangyu0402
提出日時 2025-08-01 12:38:42
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 21 ms / 5,000 ms
+ 495µs
コード長 522 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 58 ms
コンパイル使用メモリ 15,232 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2026-10-11 06:18:41
合計ジャッジ時間 1,563 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def easy_poker(cards):
    count = [0] * 14

    for card in cards:
        count[card] += 1

    freq = []
    for c in count:
        if c > 0:
            freq.append(c)

    freq.sort(reverse=True)

    if freq == [3, 2]:
        return "FULL HOUSE"
    elif freq == [3, 1, 1]:
        return "THREE CARD"
    elif freq == [2, 2, 1]:
        return "TWO PAIR"
    elif freq == [2, 1, 1, 1]:
        return "ONE PAIR"
    else:
        return "NO HAND"

cards = list(map(int, input().split()))
print(easy_poker(cards))
0