結果
問題 | No.227 簡単ポーカー |
ユーザー |
|
提出日時 | 2017-10-09 14:58:31 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 459 bytes |
コンパイル時間 | 133 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-17 06:57:34 |
合計ジャッジ時間 | 1,259 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
def main(): A = tuple(map(int, input().split())) card = dict() for i in A: card[i] = card.get(i, 0) + 1 hand = sorted(card.values(), reverse=True) if hand[0] == 3 and hand[1] == 2: ans = 'FULL HOUSE' elif hand[0] == 3: ans = 'THREE CARD' elif hand[0] == 2 and hand[1] == 2: ans = 'TWO PAIR' elif hand[0] == 2: ans = 'ONE PAIR' else: ans = 'NO HAND' print(ans) main()