結果
| 問題 | No.227 簡単ポーカー | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-02-07 12:52:07 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 44 ms / 5,000 ms | 
| コード長 | 667 bytes | 
| コンパイル時間 | 327 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 11,648 KB | 
| 最終ジャッジ日時 | 2024-06-12 05:09:53 | 
| 合計ジャッジ時間 | 1,670 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 | 
ソースコード
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()
            
            
            
        