結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,828 KB
testcase_01 AC 16 ms
7,920 KB
testcase_02 AC 16 ms
7,832 KB
testcase_03 AC 16 ms
7,820 KB
testcase_04 AC 16 ms
7,792 KB
testcase_05 AC 16 ms
7,964 KB
testcase_06 AC 16 ms
7,932 KB
testcase_07 RE -
testcase_08 AC 16 ms
7,836 KB
testcase_09 AC 16 ms
7,740 KB
testcase_10 AC 16 ms
7,796 KB
testcase_11 AC 16 ms
7,772 KB
testcase_12 AC 16 ms
7,832 KB
testcase_13 RE -
権限があれば一括ダウンロードができます

ソースコード

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
        s=A[i]
        A.pop(i)
        A.pop(i)
        A.pop(i)
        if s!=A[i]:
            if A[0]==A[1]:
                print ("FULL HOUSE")
            else:
                print ("THREE CARD")
        else:
            print ("NO HAND")
    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