結果

問題 No.227 簡単ポーカー
ユーザー eiji0313eiji0313
提出日時 2018-01-03 03:21:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 668 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 10,872 KB
実行使用メモリ 8,000 KB
最終ジャッジ日時 2023-08-24 17:11:14
合計ジャッジ時間 1,680 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,848 KB
testcase_01 AC 15 ms
7,852 KB
testcase_02 AC 15 ms
7,892 KB
testcase_03 AC 16 ms
7,788 KB
testcase_04 AC 16 ms
7,980 KB
testcase_05 AC 15 ms
7,896 KB
testcase_06 AC 16 ms
7,852 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 16 ms
7,968 KB
testcase_10 AC 15 ms
7,956 KB
testcase_11 AC 15 ms
7,868 KB
testcase_12 RE -
testcase_13 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

a = [int(x) for x in input().split()]

hands = {}
for i in range(1, 13):
    hands[i] = 0
for i in a:
    hands[i] += 1

rank = ""
flg3 = False
flg2 = False
for i in hands.keys():
    if hands[i] == 4 or hands[i] == 5:
        break
    elif hands[i] == 3:
        if flg2:
            rank = "FULL HOUSE"
            break
        flg3 = True
    elif hands[i] == 2:
        if flg2:
            rank = "TWO PAIR"
            break
        elif flg3:
            rank = "FULL HOUSE"
            break
        flg2 = True

if rank == "":
    if flg2:
        rank = "ONE PAIR"
    elif flg3:
        rank = "THREE CARD"
    else:
        rank = "NO HAND"

print(rank)
0