結果
| 問題 | No.227 簡単ポーカー |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-03-19 18:11:21 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 650 bytes |
| 記録 | |
| コンパイル時間 | 467 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 20,480 KB |
| 最終ジャッジ日時 | 2026-03-19 18:11:25 |
| 合計ジャッジ時間 | 3,151 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 RE * 4 |
ソースコード
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")