結果

問題 No.227 簡単ポーカー
ユーザー ____nabehide____nabehide
提出日時 2018-02-22 08:03:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 462 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 11,900 KB
実行使用メモリ 10,136 KB
最終ジャッジ日時 2023-10-23 20:44:35
合計ジャッジ時間 1,171 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,136 KB
testcase_01 AC 26 ms
10,136 KB
testcase_02 AC 29 ms
10,136 KB
testcase_03 AC 28 ms
10,136 KB
testcase_04 AC 28 ms
10,136 KB
testcase_05 AC 28 ms
10,136 KB
testcase_06 AC 26 ms
10,136 KB
testcase_07 AC 26 ms
10,136 KB
testcase_08 AC 26 ms
10,136 KB
testcase_09 AC 27 ms
10,136 KB
testcase_10 AC 27 ms
10,136 KB
testcase_11 AC 26 ms
10,136 KB
testcase_12 AC 26 ms
10,136 KB
testcase_13 AC 26 ms
10,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = list(map(int, input().split()))
A.sort()

count2 = 0
for i in range(4):
    if A[i] == A[i + 1]:
        count2 += 1

count3 = 0
for i in range(3):
    if A[i] == A[i + 1] == A[i + 2]:
        count3 += 1

if count3 == 1 and count2 == 3:
    print("FULL HOUSE")
elif count3 == 1 and count2 == 2:
    print("THREE CARD")
elif count3 == 0 and count2 == 2:
    print("TWO PAIR")
elif count3 == 0 and count2 == 1:
    print("ONE PAIR")
else:
    print("NO HAND")
0