結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー Watson
提出日時 2017-07-28 09:49:07
言語 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
+ 818µs
コード長 465 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 56 ms
コンパイル使用メモリ 15,104 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2026-10-11 03:12:01
合計ジャッジ時間 1,500 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

A = [int(i) for i in input().split()]
A.sort()
tw = 0
th = 0
card = 0
while card < 5:
    if A.count(A[card]) == 2:
        tw += 1
        card += 2
    elif A.count(A[card]) == 3:
        th += 1
        card += 3
    else:
        card += 1
if tw == 1 and th == 1:
    print("FULL HOUSE")
elif tw == 0 and th == 1:
    print("THREE CARD")
elif tw == 2 and th == 0:
    print("TWO PAIR")
elif tw == 1 and th == 0:
    print("ONE PAIR")
else:
    print("NO HAND")
0