結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー 初見わこつです
提出日時 2015-09-24 22:17:18
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 732 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 503 ms
コンパイル使用メモリ 20,824 KB
実行使用メモリ 36,064 KB
最終ジャッジ日時 2026-04-02 15:41:27
合計ジャッジ時間 3,399 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/python3

# This problem is http://yukicoder.me/problems/562

def convert_to_hex(string):
    array   = list(map(hex, list(map(int, string.split(' ')))))
    return ' '.join(c[2:] for c in array)

first_line  = input()

# first_line  = '5 6 5 6 5'

first_line  = convert_to_hex(string=first_line)

# print(first_line)

no_duplication  = set(first_line.split(' '))

answer  = []
for char in no_duplication:
    answer.append(len(first_line.split(char)) - 1)

answer  = sorted(answer)

if answer == [2, 3]:
    print('FULL HOUSE')
elif answer == [1, 1, 3]:
    print('THREE CARD')
elif answer == [1, 2, 2]:
    print('TWO PAIR')
elif answer == [1, 1, 1, 2]:
    print('ONE PAIR')
else:
    print('NO HAND')

# print(answer)
0