結果

問題 No.264 じゃんけん
ユーザー howakurohowakuro
提出日時 2015-10-12 22:06:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 735 bytes
コンパイル時間 3,375 ms
コンパイル使用メモリ 72,996 KB
実行使用メモリ 55,964 KB
最終ジャッジ日時 2023-09-28 12:42:52
合計ジャッジ時間 5,077 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,572 KB
testcase_01 AC 124 ms
55,752 KB
testcase_02 WA -
testcase_03 AC 124 ms
55,964 KB
testcase_04 AC 124 ms
55,680 KB
testcase_05 AC 124 ms
55,956 KB
testcase_06 AC 129 ms
55,916 KB
testcase_07 AC 126 ms
55,948 KB
testcase_08 AC 124 ms
55,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Random;
import java.util.Scanner;

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