結果

問題 No.166 マス埋めゲーム
ユーザー sasakki
提出日時 2016-03-12 21:09:53
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 444 bytes
コンパイル時間 2,162 ms
コンパイル使用メモリ 74,232 KB
実行使用メモリ 41,824 KB
最終ジャッジ日時 2024-09-25 11:08:53
合計ジャッジ時間 6,883 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 6 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class main{
    public static void main(String args[]){
	Scanner scan = new Scanner(System.in);

	int H = scan.nextInt();
	int W = scan.nextInt();
	int N = scan.nextInt();
	int K = scan.nextInt();
	
	int S = H * W;
	int lose = 1;

	for(int i = S; i > 0; i--){
	    lose++;

	    if(lose > N){
		lose = 1;
	    }
	}

	if(lose == K){
	    System.out.println("NO");
	}
	else{
	    System.out.println("YES");
	}

    }
}
0