結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー RK-4869
提出日時 2026-03-19 18:17:43
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 648 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 984 ms
コンパイル使用メモリ 20,696 KB
実行使用メモリ 20,600 KB
最終ジャッジ日時 2026-03-19 18:17:47
合計ジャッジ時間 3,094 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 RE * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

cards = map(int, input().split())

counts = [0]*13
for num in cards:
    counts[num] += 1

#フルハウスならスリーペアとツーペアなので、同じカードが3枚、2枚組がいくつあるかの組み合わせを数える。
three_count = 0
two_count = 0

for c in counts:
    if c == 3:
        three_count += 1
    elif c == 2:
        two_count += 1

#それぞれの組み合わせで役を作成してみる。
if three_count==1 and two_count == 1:
    print("FULL HOUSE")
elif three_count==1:
    print("THREE CARD")
elif two_count==2:
    print("TWO PAIR")
elif two_count==1:
    print("ONE PAIR")
else:
    print("NO HAND")
0