結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー yn
提出日時 2015-08-11 01:04:22
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 97 ms / 5,000 ms
コード長 559 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 853 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 36,180 KB
最終ジャッジ日時 2026-04-01 22:44:32
合計ジャッジ時間 2,571 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

a = list(map(int,input().split()))
a.sort()

sta = a[0]
i = 1
pairs = 0
three = 0
count = 1
while i<5:
    if sta == a[i]:
        count += 1
    else:
        sta = a[i]
        if count == 2:
            pairs += 1
        elif count == 3:
            three += 1
        count = 1

    i += 1

if count == 2:
    pairs += 1
elif count == 3:
    three += 1

if pairs == 1 and three == 1:
    print("FULL HOUSE")
elif three == 1:
    print("THREE CARD")
elif pairs == 2:
    print("TWO PAIR")
elif pairs == 1:
    print("ONE PAIR")
else:
    print("NO HAND")
0