結果
問題 | No.227 簡単ポーカー |
ユーザー |
|
提出日時 | 2022-05-20 15:11:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 5,000 ms |
コード長 | 711 bytes |
コンパイル時間 | 78 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-19 23:11:01 |
合計ジャッジ時間 | 1,081 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
from sys import stdin input = stdin.readline hand = {1: "FULL HOUSE", 2: "THREE CARD", 3: "TWOPAIR", 4: "ONE PAIR"} a_list = list(map(int, input().split())) s = list(set(a_list)) if len(s) == 3: c1 = a_list.count(s[0]) c2 = a_list.count(s[1]) c3 = a_list.count(s[2]) if len(s) == 2: c1 = a_list.count(s[0]) c2 = a_list.count(s[1]) if len(s) == 5: print("NO HAND") elif len(s) == 4: print("ONE PAIR") elif len(s) == 3: if c1 == 3 or c2 == 3 or c3 == 3: print("THREE CARD") else: print("TWO PAIR") elif len(s) == 2: if c1 == 2 or c2 == 2: print("FULL HOUSE") else: print("NO HAND") else: print("NO HAND")