結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 20 ms
8,640 KB
testcase_02 WA -
testcase_03 AC 19 ms
8,564 KB
testcase_04 AC 18 ms
8,496 KB
testcase_05 AC 18 ms
8,580 KB
testcase_06 WA -
testcase_07 AC 19 ms
8,540 KB
testcase_08 WA -
testcase_09 AC 18 ms
8,620 KB
testcase_10 AC 19 ms
8,568 KB
testcase_11 AC 19 ms
8,668 KB
testcase_12 AC 19 ms
8,568 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 PAIR")
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