結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー Yangyu0402
提出日時 2025-08-01 12:38:42
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 93 ms / 5,000 ms
+ 9µs
コード長 522 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 291 ms
コンパイル使用メモリ 21,540 KB
実行使用メモリ 15,868 KB
最終ジャッジ日時 2026-07-13 16:08:10
合計ジャッジ時間 2,715 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

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