結果

問題 No.8 N言っちゃダメゲーム
ユーザー mastersatoshimastersatoshi
提出日時 2015-08-03 12:16:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 51 ms / 5,000 ms
コード長 650 bytes
コンパイル時間 3,640 ms
コンパイル使用メモリ 71,704 KB
実行使用メモリ 49,796 KB
最終ジャッジ日時 2023-09-25 00:52:11
合計ジャッジ時間 4,217 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,112 KB
testcase_01 AC 45 ms
49,104 KB
testcase_02 AC 45 ms
49,168 KB
testcase_03 AC 51 ms
49,328 KB
testcase_04 AC 51 ms
49,204 KB
testcase_05 AC 51 ms
49,276 KB
testcase_06 AC 50 ms
49,796 KB
testcase_07 AC 51 ms
47,336 KB
testcase_08 AC 50 ms
49,012 KB
testcase_09 AC 50 ms
49,280 KB
testcase_10 AC 51 ms
49,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int P = Integer.parseInt(br.readLine());

        for (int i = 0; i < P; i++) {

            String[] strs = br.readLine().split(" ");

            int N = Integer.parseInt(strs[0]);
            int K = Integer.parseInt(strs[1]);

            int tmp = N % (K + 1);

            if (tmp != 1) {
                System.out.println("Win");
            } else {
                System.out.println("Lose");
            }
        }
    }
}
0