結果

問題 No.264 じゃんけん
ユーザー eagleeagle
提出日時 2022-05-26 14:26:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 425 bytes
コンパイル時間 2,088 ms
コンパイル使用メモリ 77,268 KB
実行使用メモリ 57,456 KB
最終ジャッジ日時 2023-10-20 19:26:16
合計ジャッジ時間 3,938 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
55,348 KB
testcase_01 AC 132 ms
57,284 KB
testcase_02 AC 131 ms
57,456 KB
testcase_03 AC 129 ms
57,072 KB
testcase_04 AC 127 ms
57,008 KB
testcase_05 AC 131 ms
57,420 KB
testcase_06 AC 131 ms
57,404 KB
testcase_07 AC 130 ms
57,304 KB
testcase_08 AC 131 ms
57,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		//自分の手
		int N = sc.nextInt();
		//相手の手
		int K = sc.nextInt();
		String ans;
		if(N == K) {
			ans = "Drew";
		} else if((N + 1) % 3 == K) {
			ans = "Won";
		} else {
			ans = "Lost";
		}
		System.out.println(ans);
	}
}
0