結果

問題 No.8 N言っちゃダメゲーム
ユーザー soujiki
提出日時 2015-04-24 18:25:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 165 ms / 5,000 ms
コード長 479 bytes
コンパイル時間 3,411 ms
コンパイル使用メモリ 74,380 KB
実行使用メモリ 41,832 KB
最終ジャッジ日時 2024-07-05 01:00:13
合計ジャッジ時間 5,787 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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