結果

問題 No.8 N言っちゃダメゲーム
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-17 23:44:14
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 502 bytes
コンパイル時間 1,793 ms
コンパイル使用メモリ 74,668 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2024-04-20 20:49:40
合計ジャッジ時間 3,858 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
41,448 KB
testcase_01 AC 113 ms
40,296 KB
testcase_02 AC 114 ms
41,584 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 155 ms
42,040 KB
testcase_06 AC 133 ms
41,624 KB
testcase_07 AC 131 ms
41,472 KB
testcase_08 AC 144 ms
41,836 KB
testcase_09 AC 138 ms
42,016 KB
testcase_10 AC 147 ms
41,744 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");
				break;
			}else{
				System.out.println("Win");
			}
		}
	}
}
0