結果

問題 No.227 簡単ポーカー
ユーザー sassysassy
提出日時 2023-07-06 16:02:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 836 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,872 KB
実行使用メモリ 7,960 KB
最終ジャッジ日時 2023-09-27 16:59:07
合計ジャッジ時間 1,071 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,848 KB
testcase_01 AC 15 ms
7,840 KB
testcase_02 AC 15 ms
7,868 KB
testcase_03 AC 15 ms
7,848 KB
testcase_04 AC 15 ms
7,816 KB
testcase_05 AC 14 ms
7,832 KB
testcase_06 AC 14 ms
7,960 KB
testcase_07 AC 13 ms
7,920 KB
testcase_08 AC 14 ms
7,764 KB
testcase_09 AC 15 ms
7,780 KB
testcase_10 AC 14 ms
7,772 KB
testcase_11 AC 14 ms
7,764 KB
testcase_12 AC 14 ms
7,792 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    A, B, C, D, E = list(map(int, input().split()))
    cards = [A, B, C, D, E]
    numbers = set(cards)
    numbers_count = []
    for card in cards:
        numbers_count.append(cards.count(card))
    # numbers_count = list(map(lambda x: cards.count(x), cards))
    
    if len(numbers) == 2:
        # FULL HOUSE
        if cards.count(A) == 2 or cards.count(A) == 3:
            print("FULL HOUSE")
        # Not FULL HOUSE -> NO PAIR
        else:
            print("NO HAND")
        
    elif len(numbers) == 3:
        # THREE CARD
        if cards.count(A) == 3 and max(numbers_count) == 3:
            print("THREE CARD")
        else:
            print("TWO PAIR")
        # TWO PAIR
    elif len(numbers) == 4:
        print("ONE PAIR")
    else:
        print("NO HAND")


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