結果

問題 No.264 じゃんけん
ユーザー d_makid_maki
提出日時 2019-03-11 16:31:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 606 bytes
コンパイル時間 3,190 ms
コンパイル使用メモリ 72,312 KB
実行使用メモリ 57,760 KB
最終ジャッジ日時 2023-09-05 20:12:22
合計ジャッジ時間 5,088 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,528 KB
testcase_01 AC 127 ms
57,760 KB
testcase_02 AC 121 ms
55,656 KB
testcase_03 AC 123 ms
56,180 KB
testcase_04 AC 123 ms
55,384 KB
testcase_05 AC 124 ms
55,916 KB
testcase_06 AC 124 ms
55,896 KB
testcase_07 AC 124 ms
55,568 KB
testcase_08 AC 125 ms
55,804 KB
権限があれば一括ダウンロードができます

ソースコード

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