結果

問題 No.8 N言っちゃダメゲーム
ユーザー soujikisoujiki
提出日時 2015-04-24 18:25:29
言語 Java19
(openjdk 21)
結果
AC  
実行時間 148 ms / 5,000 ms
コード長 479 bytes
コンパイル時間 4,003 ms
コンパイル使用メモリ 72,540 KB
実行使用メモリ 56,296 KB
最終ジャッジ日時 2023-09-18 09:10:55
合計ジャッジ時間 6,346 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,844 KB
testcase_01 AC 122 ms
55,928 KB
testcase_02 AC 120 ms
55,588 KB
testcase_03 AC 147 ms
56,044 KB
testcase_04 AC 148 ms
56,248 KB
testcase_05 AC 146 ms
55,952 KB
testcase_06 AC 147 ms
55,840 KB
testcase_07 AC 147 ms
56,040 KB
testcase_08 AC 144 ms
55,740 KB
testcase_09 AC 147 ms
56,296 KB
testcase_10 AC 144 ms
55,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Yukicoder_8{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int P = stdIn.nextInt();
		int[] N = new int[P];
		int[] K = new int[P];
		for(int i=0;i<P;i++){
			N[i] = stdIn.nextInt();
			K[i] = stdIn.nextInt();

			if(N[i]<=K[i]+1){
				System.out.println("Win");
			}
			else{
				if(N[i]%(K[i]+1)==1){
					System.out.println("Lose");
				}
				else{
					System.out.println("Win");
				}
			}
		}


	}
}
0