結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー iad_2889
提出日時 2019-05-01 04:58:34
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 101 ms / 5,000 ms
コード長 419 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 658 ms
コンパイル使用メモリ 20,704 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2026-06-05 00:01:28
合計ジャッジ時間 3,439 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

cards = [int(x) for x in input().split()]
hand = "NO HAND"
types = set(cards)
pair = 0
three_card = 0
for card in types:
    c_set = sum([1 for x in cards if x == card])
    if c_set == 2:
        pair+=1
    elif c_set == 3:
        three_card+=1
if pair and three_card:
    hand = "FULL HOUSE"
elif three_card:
    hand = "THREE CARD"
elif pair == 2:
    hand = "TWO PAIR"
elif pair:
    hand = "ONE PAIR"
print(hand)
0