結果

問題 No.227 簡単ポーカー
ユーザー MitI_7
提出日時 2015-11-01 13:38:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 452 bytes
コンパイル時間 473 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-13 06:51:16
合計ジャッジ時間 1,574 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict


def main():
    l = input().split()
    d = defaultdict(int)
    for n in l:
        d[n] += 1

    if sorted(d.values()) == [2, 3]:
        print("FULL HOUSE")
    elif 3 in d.values():
        print("THREE CARD")
    elif [1, 2, 2] == sorted(d.values()):
        print("TWO PAIR")
    elif 2 in d.values():
        print("ONE PAIR")
    else:
        print("NO HAND")

    
if __name__ == '__main__':
    main()
0