結果

問題 No.227 簡単ポーカー
ユーザー KaedeTokawaKaedeTokawa
提出日時 2022-05-20 15:11:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 711 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 11,924 KB
実行使用メモリ 10,120 KB
最終ジャッジ日時 2023-10-20 03:23:36
合計ジャッジ時間 1,306 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

from sys import stdin
input = stdin.readline
hand = {1: "FULL HOUSE", 2: "THREE CARD", 3: "TWOPAIR", 4: "ONE PAIR"}
a_list = list(map(int, input().split()))
s = list(set(a_list))
if len(s) == 3:
    c1 = a_list.count(s[0])
    c2 = a_list.count(s[1])
    c3 = a_list.count(s[2])
if len(s) == 2:
    c1 = a_list.count(s[0])
    c2 = a_list.count(s[1])
if len(s) == 5:
    print("NO HAND")
elif len(s) == 4:
    print("ONE PAIR")
elif len(s) == 3:
    if c1 == 3 or c2 == 3 or c3 == 3:
        print("THREE CARD")
    else:
        print("TWO PAIR")
elif len(s) == 2:
    if c1 == 2 or c2 == 2:
        print("FULL HOUSE")
    else:
        print("NO HAND")
else:
    print("NO HAND")
0