結果
問題 | No.227 簡単ポーカー |
ユーザー |
![]() |
提出日時 | 2024-12-14 05:30:09 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 48 ms / 5,000 ms |
コード長 | 536 bytes |
コンパイル時間 | 463 ms |
コンパイル使用メモリ | 81,836 KB |
実行使用メモリ | 54,620 KB |
最終ジャッジ日時 | 2024-12-14 05:30:11 |
合計ジャッジ時間 | 2,056 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
from collections import Counter a = list(map(int,input().split())) ans = 0 c = Counter(a) for i in range(1,14): for j in range(1,14): if i == j:continue if (c[i] == 3 and c[j] == 2) or (c[i] == 2 and c[j] == 3): ans = 4 if c[i] == 3 or c[j] == 3: ans = max(ans, 3) if c[i] == 2 and c[j] == 2: ans = max(ans , 2) if c[i] == 2 or c[j] == 2: ans = max(ans , 1) op = ['NO HAND', 'ONE PAIR', 'TWO PAIR', 'THREE CARD', 'FULL HOUSE'] print(op[ans])