結果

問題 No.166 マス埋めゲーム
ユーザー sasakkisasakki
提出日時 2016-03-12 21:09:53
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 444 bytes
コンパイル時間 2,244 ms
コンパイル使用メモリ 74,120 KB
実行使用メモリ 57,704 KB
最終ジャッジ日時 2023-10-26 03:10:54
合計ジャッジ時間 7,482 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
57,432 KB
testcase_01 AC 133 ms
57,468 KB
testcase_02 AC 133 ms
57,572 KB
testcase_03 AC 133 ms
57,368 KB
testcase_04 WA -
testcase_05 AC 133 ms
57,524 KB
testcase_06 AC 136 ms
57,488 KB
testcase_07 AC 596 ms
57,492 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 234 ms
57,656 KB
testcase_12 AC 134 ms
57,228 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 AC 134 ms
57,516 KB
testcase_16 AC 132 ms
57,612 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
権限があれば一括ダウンロードができます

ソースコード

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