結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,556 KB
testcase_01 AC 20 ms
8,492 KB
testcase_02 AC 19 ms
8,536 KB
testcase_03 AC 19 ms
8,644 KB
testcase_04 AC 19 ms
8,480 KB
testcase_05 AC 19 ms
8,612 KB
testcase_06 AC 20 ms
8,520 KB
testcase_07 AC 19 ms
8,552 KB
testcase_08 AC 19 ms
8,556 KB
testcase_09 AC 19 ms
8,520 KB
testcase_10 AC 19 ms
8,492 KB
testcase_11 AC 19 ms
8,496 KB
testcase_12 AC 20 ms
8,548 KB
testcase_13 AC 20 ms
8,524 KB
権限があれば一括ダウンロードができます

ソースコード

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 CARD")
elif pair_list[0][1] == 2:
    if pair_list[1][1] == 2:
        print("TWO PAIR")
    else:
        print("ONE PAIR")
else:
    print("NO HAND")
0