結果

問題 No.8 N言っちゃダメゲーム
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-02-24 11:11:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 150 ms / 5,000 ms
コード長 432 bytes
コンパイル時間 1,891 ms
コンパイル使用メモリ 71,044 KB
実行使用メモリ 56,204 KB
最終ジャッジ日時 2023-08-23 07:39:53
合計ジャッジ時間 4,531 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,524 KB
testcase_01 AC 123 ms
56,080 KB
testcase_02 AC 123 ms
55,528 KB
testcase_03 AC 149 ms
55,952 KB
testcase_04 AC 146 ms
56,148 KB
testcase_05 AC 148 ms
56,072 KB
testcase_06 AC 148 ms
56,116 KB
testcase_07 AC 147 ms
55,912 KB
testcase_08 AC 148 ms
56,204 KB
testcase_09 AC 150 ms
55,828 KB
testcase_10 AC 148 ms
55,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner stdin = new Scanner(System.in);
        
        int p = stdin.nextInt();
        for (int time = 0; time < p; time++) {
            int n = stdin.nextInt();
            int k = stdin.nextInt();
            String answer = (n - 1) % (k + 1) == 0 ? "Lose" : "Win";
            System.out.println(answer);
        }
    }

}
0