結果

問題 No.264 じゃんけん
ユーザー howakurohowakuro
提出日時 2015-10-12 22:10:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 680 bytes
コンパイル時間 3,160 ms
コンパイル使用メモリ 71,444 KB
実行使用メモリ 56,304 KB
最終ジャッジ日時 2023-09-28 12:42:57
合計ジャッジ時間 5,103 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,984 KB
testcase_01 AC 125 ms
55,816 KB
testcase_02 AC 125 ms
56,304 KB
testcase_03 AC 123 ms
56,112 KB
testcase_04 AC 126 ms
56,104 KB
testcase_05 AC 125 ms
55,940 KB
testcase_06 AC 125 ms
56,116 KB
testcase_07 AC 127 ms
55,856 KB
testcase_08 AC 123 ms
55,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Janken {
	
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K =scan.nextInt();
	  if(N==K){
		  System.out.println("Drew");
	  }else if(K-1==-1){
		  if(N==2){
			  System.out.println("Won");
		  }else if(N==1){
			  System.out.println("Lost");
		  }
	  }else if(N-1==-1){
		  if(K==2){
			  System.out.println("Lost");
		  }else if(K==1){
			  System.out.println("Won");
		  }
	  }else if(K-1>-1){
		  if(N==K-1){
			  System.out.println("Won");
		  }else if(N==K+1){
			  System.out.println("Lost");
		  }
	  }
	}
}
0