結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,868 KB
testcase_01 AC 127 ms
56,200 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 126 ms
55,968 KB
testcase_05 AC 127 ms
55,764 KB
testcase_06 AC 126 ms
56,200 KB
testcase_07 AC 125 ms
56,244 KB
testcase_08 AC 127 ms
55,520 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&&N==2){
	    	System.out.println("Won");
	    }else if(N-1==-1&&K==2){
	    	System.out.println("Lost");
	    }
		
	}

}
0