結果

問題 No.384 マス埋めゲーム2
ユーザー htensaihtensai
提出日時 2020-02-03 17:31:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 1,000 ms
コード長 458 bytes
コンパイル時間 3,187 ms
コンパイル使用メモリ 74,160 KB
実行使用メモリ 57,652 KB
最終ジャッジ日時 2023-10-19 06:16:50
合計ジャッジ時間 6,991 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
57,400 KB
testcase_01 AC 136 ms
57,564 KB
testcase_02 AC 141 ms
57,396 KB
testcase_03 AC 137 ms
57,652 KB
testcase_04 AC 138 ms
57,128 KB
testcase_05 AC 137 ms
57,140 KB
testcase_06 AC 139 ms
57,344 KB
testcase_07 AC 138 ms
57,104 KB
testcase_08 AC 137 ms
57,420 KB
testcase_09 AC 135 ms
57,236 KB
testcase_10 AC 136 ms
57,456 KB
testcase_11 AC 139 ms
57,352 KB
testcase_12 AC 138 ms
57,372 KB
testcase_13 AC 137 ms
57,448 KB
testcase_14 AC 137 ms
57,412 KB
testcase_15 AC 141 ms
57,384 KB
testcase_16 AC 144 ms
57,356 KB
testcase_17 AC 137 ms
57,108 KB
testcase_18 AC 137 ms
57,176 KB
testcase_19 AC 142 ms
57,568 KB
testcase_20 AC 139 ms
57,400 KB
testcase_21 AC 138 ms
57,236 KB
testcase_22 AC 139 ms
57,416 KB
testcase_23 AC 138 ms
57,316 KB
testcase_24 AC 139 ms
57,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[]  args) {
        Scanner sc = new Scanner(System.in);
        long h = sc.nextLong();
        long w = sc.nextLong();
        long n = sc.nextLong();
        long k = sc.nextLong();
        if (k == n) {
            k = 0;
        }
        if ((h + w - 1) % n == k) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
}
0