結果

問題 No.8 N言っちゃダメゲーム
ユーザー mos_13184925mos_13184925
提出日時 2018-07-08 18:57:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 150 ms / 5,000 ms
コード長 515 bytes
コンパイル時間 2,267 ms
コンパイル使用メモリ 72,164 KB
実行使用メモリ 56,288 KB
最終ジャッジ日時 2023-09-22 08:09:45
合計ジャッジ時間 4,470 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,964 KB
testcase_01 AC 125 ms
56,140 KB
testcase_02 AC 124 ms
55,680 KB
testcase_03 AC 148 ms
56,128 KB
testcase_04 AC 148 ms
55,960 KB
testcase_05 AC 148 ms
55,996 KB
testcase_06 AC 149 ms
54,172 KB
testcase_07 AC 150 ms
55,992 KB
testcase_08 AC 150 ms
56,288 KB
testcase_09 AC 148 ms
55,944 KB
testcase_10 AC 148 ms
55,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int[] n = new int[p];
        int[] k = new int[p];
        for(int i = 0; i < p; i++){
            n[i] = sc.nextInt();
            k[i] = sc.nextInt();
        }
        for(int i = 0; i < p; i++){
            String ans = "Win";
            if((n[i] - 1) % (k[i] + 1) == 0) ans = "Lose";
            System.out.println(ans);
        }
    }
}
0