結果

問題 No.227 簡単ポーカー
ユーザー oz4point5oz4point5
提出日時 2019-03-30 16:14:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 579 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 10,860 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2023-08-09 20:37:31
合計ジャッジ時間 1,299 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,856 KB
testcase_01 AC 15 ms
7,776 KB
testcase_02 AC 15 ms
7,848 KB
testcase_03 AC 15 ms
7,888 KB
testcase_04 AC 15 ms
7,792 KB
testcase_05 AC 15 ms
7,924 KB
testcase_06 AC 16 ms
7,816 KB
testcase_07 AC 15 ms
7,976 KB
testcase_08 AC 15 ms
7,928 KB
testcase_09 AC 16 ms
7,808 KB
testcase_10 AC 15 ms
7,860 KB
testcase_11 AC 15 ms
7,796 KB
testcase_12 AC 15 ms
7,808 KB
testcase_13 AC 15 ms
7,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
a = list(map(int,input().split()))

a.sort()

same = 0
samearray = []

a = a + [14]

for i in range(len(a)-1):
    if a[i] == a[i+1]:
        same += 1
    else:
        samearray.append(same+1)
        same = 0

samearray.sort()
samearray.reverse()

if len(samearray) == 0:
    print("NO HAND")
elif samearray[0] == 3 and samearray[1] == 2:
    print("FULL HOUSE")
elif samearray[0] == 3:
    print("THREE CARD")
elif samearray[0] == 2 and samearray[1] == 2:
    print("TWO PAIR")
elif samearray[0] == 2:
    print("ONE PAIR")
else:
    print("NO HAND")
0