結果

問題 No.227 簡単ポーカー
ユーザー notsix4
提出日時 2021-12-02 12:38:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 401 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-05 01:51:02
合計ジャッジ時間 1,266 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

a=input().split()
d={}
for i in range(5):
    if a[i] not in d:
        d[a[i]]=1
    else:
        d[a[i]]+=1
dic2 = sorted(d.items(), key=lambda x:x[1], reverse=True)
if dic2[0][1]==3 and dic2[1][1]==2:
    print("FULL HOUSE")
elif dic2[0][1]==3:
    print("THREE CARD")
elif dic2[0][1]==2 and dic2[1][1]==2:
    print("TWO PAIR")
elif dic2[0][1]==2:
    print("ONE PAIR")
else:
    print("NO HAND")
0