結果

問題 No.264 じゃんけん
コンテスト
ユーザー 田中ひろし
提出日時 2024-12-27 13:11:22
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 24 ms / 5,000 ms
+ 778µs
コード長 581 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 75 ms
コンパイル使用メモリ 80,384 KB
実行使用メモリ 55,844 KB
最終ジャッジ日時 2026-10-08 14:41:34
合計ジャッジ時間 2,166 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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