結果

問題 No.227 簡単ポーカー
ユーザー kohei2019kohei2019
提出日時 2022-01-05 19:03:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 397 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 53,760 KB
最終ジャッジ日時 2024-04-23 23:25:14
合計ジャッジ時間 1,464 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,760 KB
testcase_01 AC 42 ms
53,504 KB
testcase_02 AC 43 ms
53,376 KB
testcase_03 AC 42 ms
53,504 KB
testcase_04 AC 41 ms
53,376 KB
testcase_05 AC 41 ms
53,248 KB
testcase_06 AC 41 ms
53,248 KB
testcase_07 AC 41 ms
53,504 KB
testcase_08 AC 40 ms
53,376 KB
testcase_09 AC 42 ms
53,504 KB
testcase_10 AC 42 ms
53,632 KB
testcase_11 AC 41 ms
53,760 KB
testcase_12 AC 40 ms
53,504 KB
testcase_13 AC 40 ms
53,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
ls = list(map(int,input().split()))
cnt = list(collections.Counter(ls).values())
cnt.sort()
if2 = 0
if3 = 0
for i in cnt:
    if i == 2:
        if2 += 1
    elif i == 3:
        if3 += 1

if if3 == 1 and if2 == 1:
    print('FULL HOUSE')
elif if2 == 2:
    print('TWO PAIR')
elif if3 == 1:
    print('THREE CARD')
elif if2 == 1:
    print('ONE PAIR')
else:
    print('NO HAND')
0