結果

問題 No.227 簡単ポーカー
ユーザー cimacima
提出日時 2018-06-09 05:32:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 491 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,872 KB
実行使用メモリ 8,604 KB
最終ジャッジ日時 2023-09-13 01:39:56
合計ジャッジ時間 1,839 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,604 KB
testcase_01 AC 17 ms
8,516 KB
testcase_02 AC 18 ms
8,384 KB
testcase_03 AC 18 ms
8,536 KB
testcase_04 AC 18 ms
8,580 KB
testcase_05 AC 18 ms
8,496 KB
testcase_06 AC 17 ms
8,420 KB
testcase_07 AC 17 ms
8,404 KB
testcase_08 AC 18 ms
8,568 KB
testcase_09 AC 18 ms
8,480 KB
testcase_10 AC 18 ms
8,576 KB
testcase_11 AC 18 ms
8,576 KB
testcase_12 AC 19 ms
8,484 KB
testcase_13 AC 18 ms
8,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

hand = ['FULL HOUSE', 'THREE CARD', 'TWO PAIR', 'ONE PAIR', 'NO HAND']
pair2 = 0
pair3 = 0

l = [int(x) for x in input().split()]
i = Counter(l)

for x in i.most_common():
    if x[1] == 3:
        pair3 += 1
    elif x[1] == 2:
        pair2 += 1
    else:
        continue

if pair2 == 1 and pair3 == 1:
    print(hand[0])
elif pair3 == 1:
    print(hand[1])
elif pair2 == 2:
    print(hand[2])
elif pair2 == 1:
    print(hand[3])
else:
    print(hand[4])
0