結果

問題 No.264 じゃんけん
ユーザー d_maki
提出日時 2019-03-11 16:31:59
言語 Java
(openjdk 23)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 606 bytes
コンパイル時間 3,088 ms
コンパイル使用メモリ 75,196 KB
実行使用メモリ 54,340 KB
最終ジャッジ日時 2024-06-23 15:36:47
合計ジャッジ時間 4,750 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No264 {
	private static final String k = " ";

	public static void main(String[] args) {
		String input = null;
		Scanner sc = new Scanner(System.in);
		input = sc.nextLine();
		String[] split = input.split(k);
		int a = Integer.parseInt(split[0]);
		int b = Integer.parseInt(split[1]);

		if ((a == 0 && b == 0) || (a == 1 && b == 1) || (a == 2 && b == 2)) {
			System.out.println("Drew");
		} else if ((a == 0 && b == 1) || (a == 1 && b == 2) || (a == 2 && b == 0)) {
			System.out.println("Won");
		} else {
			System.out.println("Lost");
		}
		sc.close();
	}

}
0