結果
| 問題 |
No.227 簡単ポーカー
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-06-19 22:46:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 561 bytes |
| コンパイル時間 | 264 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-07 04:08:35 |
| 合計ジャッジ時間 | 1,199 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
import collections
a = list(map(int, input().split()))
count = list(collections.Counter(a).values())
count.sort()
def is_full_house(count):
return count == [2, 3]
def is_three_card(count):
return count == [1, 1, 3]
def is_two_pair(count):
return count == [1, 2, 2]
def is_one_pair(count):
return count == [1, 1, 1, 2]
if is_full_house(count):
print('FULL HOUSE')
elif is_three_card(count):
print('THREE CARD')
elif is_two_pair(count):
print('TWO PAIR')
elif is_one_pair(count):
print('ONE PAIR')
else:
print('NO HAND')