結果

問題 No.227 簡単ポーカー
ユーザー sngm1sngm1
提出日時 2016-04-24 13:52:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 627 bytes
コンパイル時間 137 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-15 04:24:51
合計ジャッジ時間 1,151 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 29 ms
10,880 KB
testcase_02 AC 28 ms
10,880 KB
testcase_03 AC 27 ms
10,880 KB
testcase_04 AC 27 ms
10,752 KB
testcase_05 AC 28 ms
10,752 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 27 ms
10,752 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 29 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = list(map(int, input().split()))
A.sort()
# 左から
if A[0] == A[1]:
    if A[1] == A[2]:
        if A[3] == A[4]:
            print("FULL HOUSE")
        else:
            print("THREE CARD")
    elif A[2] == A[3] or A[3] == A[4]:
        print("TWO PAIR")
    else:
        print("ONE PAIR")
# 右から
elif A[3] == A[4]:
    if A[2] == A[3]:
        if A[0] == A[1]:
            print("FULL HOUSE")
        else:
            print("THREE CARD")
    elif A[1] == A[2]:
        print("TWO CARD")
    else:
        print("ONE PAIR")
# 真ん中
elif A[1] == A[2] == A[3]:
    print("TREE CARD")
else:
    print("NO HAND")
0