結果
| 問題 | No.227 簡単ポーカー |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-07 12:52:07 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 25 ms / 5,000 ms |
| + 564µs | |
| コード長 | 667 bytes |
| 記録 | |
| コンパイル時間 | 58 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2026-10-11 05:55:17 |
| 合計ジャッジ時間 | 1,524 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
import collections
from typing import Counter
def main():
a, b, c, d, e = (int(x) for x in input().split())
l = [a, b, c, d, e]
counter = collections.Counter(l)
if len(counter) == 1:
print('NO HAND')
exit()
k = counter.most_common()[0][1]
m = counter.most_common()[1][1]
s = len(counter)
if k == 3 and m == 2:
print('FULL HOUSE')
elif k == 3 and m == 1 and s == 3:
print('THREE CARD')
elif k == 2 and m == 2 and s == 3:
print('TWO PAIR')
elif k == 2 and m == 1 and s == 4:
print('ONE PAIR')
else:
print('NO HAND')
if __name__ == '__main__':
main()