結果

問題 No.8 N言っちゃダメゲーム
ユーザー rn4ru
提出日時 2016-04-13 01:55:40
言語 Java
(openjdk 23)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 428 bytes
コンパイル時間 1,829 ms
コンパイル使用メモリ 74,368 KB
実行使用メモリ 54,404 KB
最終ジャッジ日時 2024-10-04 06:40:33
合計ジャッジ時間 4,034 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int P = scanner.nextInt();
		for (int i = 0; i < P; i++) {
			int N = scanner.nextInt();
			int K = scanner.nextInt();
			f(N, K);
		}
	}

	private static void f(int n, int k) {
		if ((n - 1) % (k + 1) != 0) {
			System.out.println("Win");
		} else {
			System.out.println("Lose");
		}
	}

}
0