結果

問題 No.227 簡単ポーカー
ユーザー konabekonabe
提出日時 2017-12-16 22:20:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 539 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,904 KB
実行使用メモリ 10,432 KB
最終ジャッジ日時 2023-08-21 11:15:40
合計ジャッジ時間 1,446 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,248 KB
testcase_01 AC 34 ms
10,416 KB
testcase_02 AC 34 ms
10,336 KB
testcase_03 AC 34 ms
10,164 KB
testcase_04 AC 33 ms
10,432 KB
testcase_05 AC 33 ms
10,428 KB
testcase_06 AC 33 ms
10,424 KB
testcase_07 AC 33 ms
10,396 KB
testcase_08 AC 32 ms
10,372 KB
testcase_09 AC 31 ms
10,232 KB
testcase_10 AC 32 ms
10,424 KB
testcase_11 AC 31 ms
10,132 KB
testcase_12 AC 31 ms
10,188 KB
testcase_13 AC 31 ms
10,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import statistics
cards = list(map(int, input().split()))
counts = [0 for i in range(13)]
for card in cards:
    counts[card-1]+=1
checker = 0
for count in counts:
    if count in [4, 5]:
        print("NO HAND")
        checker = -1
        break
    if count == 2:
        checker += 1
    if count == 3:
        checker += 10
if checker == 1:
    print("ONE PAIR")
elif checker == 2:
    print("TWO PAIR")
elif checker == 10:
    print("THREE CARD")
elif checker == 11:
    print("FULL HOUSE")
elif checker != -1:
    print("NO HAND")

0