結果

問題 No.227 簡単ポーカー
ユーザー Daiki_000
提出日時 2024-12-19 17:56:18
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 619 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-12-19 17:56:20
合計ジャッジ時間 1,533 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

def determine_role(total):
    if 5 == total:
        return ("FULL HOUSE")
    elif 4 == total:
        return ("THREE CARD")
    elif 3 == total:
        return ("TWO PAIR")
    elif 2 == total:
        return ("ONE PAIR")
    else:
        return ("NO HAND")


def main():
    hands = sorted(list(map(int, input().split())))
    role_hands = list(set(hands))
    role_counts = [hands.count(role) for role in role_hands]
    role_counts = [pair_card for pair_card in role_counts if pair_card != 1]
    total = sum(role_counts)
    result = determine_role(total)
    print(result)
if __name__ == "__main__":
    main()
0