結果

問題 No.227 簡単ポーカー
ユーザー WatsonWatson
提出日時 2017-07-28 09:49:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 465 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-18 11:33:27
合計ジャッジ時間 1,047 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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