結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,764 KB
testcase_01 AC 16 ms
7,772 KB
testcase_02 AC 15 ms
7,844 KB
testcase_03 AC 16 ms
7,804 KB
testcase_04 AC 16 ms
7,824 KB
testcase_05 AC 16 ms
7,844 KB
testcase_06 AC 16 ms
7,772 KB
testcase_07 AC 16 ms
7,760 KB
testcase_08 AC 16 ms
7,796 KB
testcase_09 AC 16 ms
7,768 KB
testcase_10 AC 16 ms
7,820 KB
testcase_11 AC 16 ms
7,900 KB
testcase_12 AC 16 ms
7,840 KB
testcase_13 AC 16 ms
7,824 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
        s=A[i]
        A.pop(i)
        A.pop(i)
        A.pop(i)
        if s!=A[0]:
            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