結果
問題 |
No.227 簡単ポーカー
|
ユーザー |
|
提出日時 | 2025-06-30 22:39:40 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 540 bytes |
コンパイル時間 | 648 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,240 KB |
最終ジャッジ日時 | 2025-06-30 22:39:43 |
合計ジャッジ時間 | 2,187 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
def main(): nums = list(map(int, input().split())) n = len(nums) counts = [0] * 14 ans = 0 for i in nums: counts[i] += 1 counts_rm = [x for x in counts if x > 0] ans = sorted(counts_rm, reverse=True) if ans[0] == 3 and ans[1] == 2: print("FULL HOUSE") elif ans[0] == 3: print("THREE CARD") elif ans[0] == 2 and ans[1] == 2: print("TWO PAIR") elif ans[0] == 2: print("ONE PAIR") else: print("NO HAND") if __name__=='__main__': main()