結果

問題 No.8 N言っちゃダメゲーム
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-02-10 23:00:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 151 ms / 5,000 ms
コード長 589 bytes
コンパイル時間 2,089 ms
コンパイル使用メモリ 74,136 KB
実行使用メモリ 57,628 KB
最終ジャッジ日時 2023-10-21 22:36:16
合計ジャッジ時間 4,576 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
56,112 KB
testcase_01 AC 127 ms
57,268 KB
testcase_02 AC 125 ms
57,368 KB
testcase_03 AC 144 ms
57,468 KB
testcase_04 AC 151 ms
57,396 KB
testcase_05 AC 144 ms
57,620 KB
testcase_06 AC 142 ms
57,584 KB
testcase_07 AC 140 ms
57,572 KB
testcase_08 AC 143 ms
57,548 KB
testcase_09 AC 144 ms
57,628 KB
testcase_10 AC 148 ms
57,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int p = in.nextInt();
        int[] n = new int[p];
        int[] k = new int[p];
        for(int i=0; i<p; i++) {
            n[i] = in.nextInt();
            k[i] = in.nextInt();
        }

        for(int i=0; i<p; i++) {
            int temp = n[i] % (k[i] + 1);
            if(temp != 1) {
                System.out.println("Win");
            } else {
                System.out.println("Lose");
            }
        }
    }
}
0