結果

問題 No.227 簡単ポーカー
ユーザー R NR N
提出日時 2020-10-06 13:27:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 8,712 KB
最終ジャッジ日時 2023-09-27 07:37:40
合計ジャッジ時間 1,069 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,528 KB
testcase_01 AC 19 ms
8,592 KB
testcase_02 WA -
testcase_03 AC 20 ms
8,712 KB
testcase_04 AC 21 ms
8,532 KB
testcase_05 AC 19 ms
8,528 KB
testcase_06 AC 19 ms
8,632 KB
testcase_07 AC 19 ms
8,580 KB
testcase_08 AC 18 ms
8,572 KB
testcase_09 AC 19 ms
8,496 KB
testcase_10 AC 19 ms
8,528 KB
testcase_11 AC 18 ms
8,644 KB
testcase_12 AC 19 ms
8,524 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding=utf-8:

import collections

cards = list(map(int, input().split()))

c = collections.Counter(cards)

pair_list = c.most_common(2)

if pair_list[0][1] >= 4:
    print("NO HAND")
elif pair_list[0][1] == 3:
    if pair_list[1][1] == 2:
        print("FULL HOUSE")
    else:
        print("THREE CARDS")
elif pair_list[0][1] == 2:
    if pair_list[1][1] == 2:
        print("TWO PAIR")
    else:
        print("ONE PAIR")
else:
    print("NO HAND")
0