結果

問題 No.227 簡単ポーカー
ユーザー miya145592miya145592
提出日時 2023-05-03 17:23:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 60 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 71,556 KB
最終ジャッジ日時 2023-08-14 01:46:31
合計ジャッジ時間 1,986 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
71,256 KB
testcase_01 AC 58 ms
71,556 KB
testcase_02 AC 57 ms
71,344 KB
testcase_03 AC 58 ms
71,088 KB
testcase_04 AC 57 ms
71,488 KB
testcase_05 AC 60 ms
71,264 KB
testcase_06 AC 57 ms
71,472 KB
testcase_07 AC 57 ms
71,220 KB
testcase_08 AC 57 ms
71,304 KB
testcase_09 AC 57 ms
71,048 KB
testcase_10 AC 57 ms
71,344 KB
testcase_11 AC 57 ms
71,488 KB
testcase_12 AC 57 ms
71,336 KB
testcase_13 AC 58 ms
71,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = list(map(int, input().split()))
D = dict()
for a in A:
    if a not in D:
        D[a] = 1
    else:
        D[a] += 1
cnt2 = 0
cnt3 = 0
for key in D:
    if D[key]==3:
        cnt3+=1
    elif D[key]==2:
        cnt2+=1
if cnt3==1 and cnt2==1:
    print("FULL HOUSE")
elif cnt3==1:
    print("THREE CARD")
elif cnt2==2:
    print("TWO PAIR")
elif cnt2==1:
    print("ONE PAIR")
else:
    print("NO HAND")
0