結果

問題 No.227 簡単ポーカー
ユーザー ああいいああいい
提出日時 2022-03-17 23:20:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 5,000 ms
コード長 435 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 82,460 KB
実行使用メモリ 55,532 KB
最終ジャッジ日時 2024-04-09 21:56:22
合計ジャッジ時間 1,369 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,908 KB
testcase_01 AC 36 ms
55,056 KB
testcase_02 AC 36 ms
54,132 KB
testcase_03 AC 36 ms
54,484 KB
testcase_04 AC 38 ms
54,936 KB
testcase_05 AC 36 ms
54,400 KB
testcase_06 AC 37 ms
55,336 KB
testcase_07 AC 36 ms
54,124 KB
testcase_08 AC 36 ms
54,160 KB
testcase_09 AC 37 ms
55,532 KB
testcase_10 AC 37 ms
54,188 KB
testcase_11 AC 37 ms
55,244 KB
testcase_12 AC 36 ms
55,356 KB
testcase_13 AC 38 ms
55,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = list(map(int,input().split()))
from collections import defaultdict
d = defaultdict(int)
for a in A:
    d[a] += 1
l = sorted(d.values())
import sys
N = "NO HAND"
if len(l) == 1:
    print(N)
    exit()
if l[0] == 2 and l[1] == 3:
    print('FULL HOUSE')
    exit()
if l[-1] == 3:
    print("THREE CARD")
    exit()
if l[-1] == 2 and l[-2] == 2:
    print("TWO PAIR")
    exit()
if 2 in l:
    print("ONE PAIR")
    exit()
print(N)
0