結果

問題 No.264 じゃんけん
ユーザー shinwisteriashinwisteria
提出日時 2017-03-18 18:14:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 344 bytes
コンパイル時間 3,698 ms
コンパイル使用メモリ 72,032 KB
実行使用メモリ 57,852 KB
最終ジャッジ日時 2023-09-18 02:30:36
合計ジャッジ時間 5,695 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,824 KB
testcase_01 AC 126 ms
55,524 KB
testcase_02 AC 123 ms
55,680 KB
testcase_03 AC 124 ms
55,356 KB
testcase_04 AC 124 ms
57,852 KB
testcase_05 AC 125 ms
55,804 KB
testcase_06 AC 124 ms
55,804 KB
testcase_07 AC 125 ms
55,616 KB
testcase_08 AC 125 ms
55,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Janken {

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

	}

}
0