結果

問題 No.384 マス埋めゲーム2
ユーザー GrenacheGrenache
提出日時 2016-07-01 23:33:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 1,000 ms
コード長 582 bytes
コンパイル時間 2,858 ms
コンパイル使用メモリ 75,356 KB
実行使用メモリ 54,272 KB
最終ジャッジ日時 2024-04-20 06:14:52
合計ジャッジ時間 6,381 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
53,232 KB
testcase_01 AC 102 ms
53,136 KB
testcase_02 AC 102 ms
53,128 KB
testcase_03 AC 113 ms
54,140 KB
testcase_04 AC 102 ms
53,392 KB
testcase_05 AC 113 ms
54,076 KB
testcase_06 AC 111 ms
53,776 KB
testcase_07 AC 103 ms
52,960 KB
testcase_08 AC 118 ms
54,076 KB
testcase_09 AC 114 ms
54,272 KB
testcase_10 AC 101 ms
52,764 KB
testcase_11 AC 114 ms
54,172 KB
testcase_12 AC 104 ms
53,068 KB
testcase_13 AC 114 ms
54,120 KB
testcase_14 AC 106 ms
52,992 KB
testcase_15 AC 105 ms
52,896 KB
testcase_16 AC 115 ms
54,004 KB
testcase_17 AC 103 ms
53,116 KB
testcase_18 AC 113 ms
53,964 KB
testcase_19 AC 99 ms
53,260 KB
testcase_20 AC 99 ms
53,116 KB
testcase_21 AC 112 ms
54,264 KB
testcase_22 AC 111 ms
53,824 KB
testcase_23 AC 110 ms
54,020 KB
testcase_24 AC 106 ms
53,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder384 {

    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	Printer pr = new Printer(System.out);

    	int h = sc.nextInt();
    	int w = sc.nextInt();
    	long n = sc.nextLong();
    	long k = sc.nextLong();

    	if ((h - 1 + w - 1) % n == k - 1) {
    		pr.println("YES");
    	} else {
    		pr.println("NO");
    	}

        pr.close();
        sc.close();
    }

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0