結果

問題 No.8 N言っちゃダメゲーム
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-17 23:47:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 159 ms / 5,000 ms
コード長 491 bytes
コンパイル時間 2,235 ms
コンパイル使用メモリ 74,368 KB
実行使用メモリ 42,044 KB
最終ジャッジ日時 2024-04-20 20:50:25
合計ジャッジ時間 4,529 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
41,456 KB
testcase_01 AC 138 ms
41,188 KB
testcase_02 AC 136 ms
41,072 KB
testcase_03 AC 154 ms
41,552 KB
testcase_04 AC 155 ms
42,044 KB
testcase_05 AC 158 ms
41,968 KB
testcase_06 AC 159 ms
41,680 KB
testcase_07 AC 153 ms
41,844 KB
testcase_08 AC 156 ms
41,700 KB
testcase_09 AC 157 ms
41,616 KB
testcase_10 AC 156 ms
41,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int p = scanner.nextInt();
		int n[]=new int[p];
		int k[]=new int[p];
		for(int i=0;i<p;i++){
			n[i]=scanner.nextInt();
			k[i]=scanner.nextInt();
		}
		for(int i=0;i<p;i++){
			int tarN=n[i]-1;
			int tarK=k[i]+1;
			if(tarN%tarK==0){
				System.out.println("Lose");
			}else{
				System.out.println("Win");
			}
		}
	}
}
0