結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー iad_2889
提出日時 2019-05-01 04:58:34
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 20 ms / 5,000 ms
+ 238µs
コード長 419 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 53 ms
コンパイル使用メモリ 14,848 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2026-10-11 05:13:03
合計ジャッジ時間 1,436 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

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