結果

問題 No.227 簡単ポーカー
ユーザー rocoderrocoder
提出日時 2017-05-11 03:32:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 687 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 10,952 KB
実行使用メモリ 7,912 KB
最終ジャッジ日時 2023-10-13 10:20:42
合計ジャッジ時間 1,165 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 16 ms
7,836 KB
testcase_02 AC 16 ms
7,912 KB
testcase_03 AC 15 ms
7,832 KB
testcase_04 AC 15 ms
7,836 KB
testcase_05 AC 15 ms
7,820 KB
testcase_06 WA -
testcase_07 AC 16 ms
7,836 KB
testcase_08 WA -
testcase_09 AC 15 ms
7,860 KB
testcase_10 AC 16 ms
7,752 KB
testcase_11 AC 16 ms
7,748 KB
testcase_12 AC 15 ms
7,816 KB
testcase_13 AC 15 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A=[int(i) for i in input().split()]
A.sort()
t=0
w=0
i=0
while i<3 and t==0:
    if A[i]==A[i+1] and A[i+1]==A[i+2]:
        t=3
        w=3
        A.pop(i)
        A.pop(i)
        A.pop(i)
        if A[0]==A[1]:
            print ("FULL HOUSE")
        else:
            print ("THREE CARD")
    i+=1
j=0
if t==0:
    while w==0 and j <4:
        if A[j]==A[j+1]:
            w=1
            A.pop(j)
            A.pop(j)
            k=0
            for k in range(2):
                if A[k]==A[k+1]:
                    print ("TWO PAIR")
                    w=2
                k+=1
            if w==1:
               print ("ONE PAIR")
        j+=1
if w==0:
    print ("NO HAND")
0