結果

問題 No.227 簡単ポーカー
ユーザー boya978
提出日時 2019-09-08 03:35:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 539 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-27 14:51:06
合計ジャッジ時間 1,150 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

cards = list(map(int,input().split()))
dict = {}

for i in cards:
    if i in dict:
        dict[i]+=1
    else:
        dict[i]=1

array=[]
for num,count in dict.items():
    array.append(count)

result = ""

if len(array)==2:
    if max(array)==4:
        result="NO HAND"
    else:
        result = "FULL HOUSE"
        
elif len(array)==3:
    if max(array)==3:
        result="THREE CARD"
    else:
        result="TWO PAIR"
        
elif len(array)==4:
    result="ONE PAIR"
    
else:
    result="NO HAND"
    
print(result)
    


0