結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
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))

    print(numbers_count)
    
    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 PAIR")
        
    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