結果

問題 No.227 簡単ポーカー
ユーザー RinTabataRinTabata
提出日時 2024-02-13 14:15:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 546 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2024-02-13 14:15:18
合計ジャッジ時間 1,635 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,984 KB
testcase_01 AC 28 ms
9,984 KB
testcase_02 AC 30 ms
9,984 KB
testcase_03 AC 28 ms
9,984 KB
testcase_04 AC 28 ms
9,984 KB
testcase_05 AC 28 ms
9,984 KB
testcase_06 AC 32 ms
9,984 KB
testcase_07 AC 28 ms
9,984 KB
testcase_08 AC 27 ms
9,984 KB
testcase_09 AC 28 ms
9,984 KB
testcase_10 AC 28 ms
9,984 KB
testcase_11 AC 30 ms
9,984 KB
testcase_12 AC 28 ms
9,984 KB
testcase_13 AC 28 ms
9,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = list(map(int,input().split()))
dic = {}
for i in range(5):
    if A[i] in dic:
        dic[A[i]] += 1
    else:
        dic[A[i]] = 1
four = 0
three = 0
two = 0

for value in dic.values():
    if value == 4:
        four += 1
    elif value == 3:
        three += 1
    elif value == 2:
        two += 1

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