結果

問題 No.264 じゃんけん
ユーザー 田中ひろし
提出日時 2024-12-27 13:11:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 57 ms / 5,000 ms
コード長 581 bytes
コンパイル時間 611 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 51,712 KB
最終ジャッジ日時 2024-12-27 13:11:44
合計ジャッジ時間 2,102 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

hand = list(map(int, input().split()))
def rockPaperScissors(hand):
    isEvenNumber = sum(hand)
    if hand[0] == hand[1]:
        print("Drew")
    elif isEvenNumber%2 == 0:
        # 偶数なら大きいほうが勝つ
        # 最大値がどちらか?
        if hand.index(max(hand)) == 0:
            print("Won")
        else:
            print("Lost")
    elif isEvenNumber%2 == 1:
        if hand.index(min(hand)) == 0:
            print("Won")
        else:
            print("Lost")
    else:
        print("Error..SomethingWrong index...")
rockPaperScissors(hand)
0