結果

問題 No.8 N言っちゃダメゲーム
ユーザー kanra661kanra661
提出日時 2014-12-16 17:07:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 158 ms / 5,000 ms
コード長 493 bytes
コンパイル時間 2,349 ms
コンパイル使用メモリ 71,216 KB
実行使用メモリ 56,048 KB
最終ジャッジ日時 2023-09-02 15:20:40
合計ジャッジ時間 4,620 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
55,468 KB
testcase_01 AC 127 ms
55,816 KB
testcase_02 AC 129 ms
55,864 KB
testcase_03 AC 154 ms
55,804 KB
testcase_04 AC 154 ms
55,588 KB
testcase_05 AC 158 ms
55,856 KB
testcase_06 AC 157 ms
55,636 KB
testcase_07 AC 158 ms
55,804 KB
testcase_08 AC 156 ms
55,792 KB
testcase_09 AC 158 ms
55,984 KB
testcase_10 AC 151 ms
56,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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<n.length;i++){
			n[i] = sc.nextInt();
			k[i] = sc.nextInt();
			if(n[i] <= k[i]){
				System.out.println("Win");
			}else if(((n[i])%(k[i]+1)) == 1){
				System.out.println("Lose");
			}else{
				System.out.println("Win");
			}
		}
		sc.close();
	}

}
0