結果

問題 No.227 簡単ポーカー
ユーザー perro1214perro1214
提出日時 2022-02-04 06:07:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 431 bytes
コンパイル時間 658 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 7,920 KB
最終ジャッジ日時 2023-09-02 03:23:58
合計ジャッジ時間 1,633 ms
ジャッジサーバーID
(参考情報)
judge11 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,808 KB
testcase_01 AC 15 ms
7,776 KB
testcase_02 AC 16 ms
7,732 KB
testcase_03 AC 15 ms
7,732 KB
testcase_04 AC 15 ms
7,920 KB
testcase_05 AC 15 ms
7,908 KB
testcase_06 AC 15 ms
7,816 KB
testcase_07 AC 15 ms
7,804 KB
testcase_08 AC 15 ms
7,740 KB
testcase_09 AC 15 ms
7,800 KB
testcase_10 AC 15 ms
7,800 KB
testcase_11 AC 15 ms
7,800 KB
testcase_12 AC 15 ms
7,892 KB
testcase_13 AC 15 ms
7,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = list(map(int,input().split()))
Tw = set()
Tr = set()
for i in range(5):
    if 3 == A.count(A[i]) and i not in Tr:
        Tr.add(A[i])
    elif 2 == A.count(A[i]) and i not in Tw:
        Tw.add(A[i])

#print(Tr,Tw)
Tr = len(Tr)
Tw = len(Tw)
if Tr == 1 and Tw == 1:
    print("FULL HOUSE")
elif Tr == 1:
    print("THREE CARD")
elif Tw == 2:
    print("TWO PAIR")
elif Tw == 1:
    print("ONE PAIR")
else:
    print("NO HAND")
0