結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー rpy3cpp
提出日時 2015-06-19 22:46:07
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 91 ms / 5,000 ms
+ 323µs
コード長 561 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 292 ms
コンパイル使用メモリ 21,540 KB
実行使用メモリ 15,868 KB
最終ジャッジ日時 2026-08-10 17:21:12
合計ジャッジ時間 3,211 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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')
0