結果

問題 No.264 じゃんけん
ユーザー Hiroaki Kono
提出日時 2017-10-26 20:49:05
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 463 bytes
コンパイル時間 3,081 ms
コンパイル使用メモリ 75,520 KB
実行使用メモリ 52,156 KB
最終ジャッジ日時 2024-11-21 20:09:10
合計ジャッジ時間 4,862 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No264 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int me = s.nextInt();
        int opponent = s.nextInt();
        int diff = me - opponent;
        if (diff == 0) {
            System.out.println("Drew");
        } else if (diff == -1 || diff == 2) {
            System.out.println("Won");
        } else {
            System.out.println("Lost");
        }
    }
}
0