結果

問題 No.8 N言っちゃダメゲーム
ユーザー m4s4k1ch1m4s4k1ch1
提出日時 2015-05-28 16:19:03
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 696 bytes
コンパイル時間 3,314 ms
コンパイル使用メモリ 71,172 KB
実行使用メモリ 49,644 KB
最終ジャッジ日時 2023-09-20 17:08:28
合計ジャッジ時間 3,165 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,352 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String args[]) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		int p = Integer.parseInt(line);
		
		for (int t = 0; t < p; t++) {
			line = br.readLine();
			String[] lines = line.split(" ");
			int n = Integer.parseInt(lines[0]);
			int k = Integer.parseInt(lines[1]);
			
			// 最大値の1つ前を相手に言われたら負け。
			// K + 1 = 後手が調整できる数。
			if ((n - 1) % (k + 1) == 0) {
				System.out.println("Lose");
			} else {
				System.out.println("Wim");
			}
		}
	}
}
0