結果

問題 No.166 マス埋めゲーム
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-30 08:23:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 1,000 ms
コード長 756 bytes
コンパイル時間 3,745 ms
コンパイル使用メモリ 71,344 KB
実行使用メモリ 49,524 KB
最終ジャッジ日時 2023-10-11 23:15:33
合計ジャッジ時間 5,708 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,460 KB
testcase_01 AC 44 ms
49,352 KB
testcase_02 AC 43 ms
49,308 KB
testcase_03 AC 44 ms
49,352 KB
testcase_04 AC 43 ms
49,336 KB
testcase_05 AC 44 ms
49,384 KB
testcase_06 AC 44 ms
49,176 KB
testcase_07 AC 43 ms
49,304 KB
testcase_08 AC 43 ms
49,252 KB
testcase_09 AC 43 ms
49,156 KB
testcase_10 AC 43 ms
49,484 KB
testcase_11 AC 44 ms
49,288 KB
testcase_12 AC 44 ms
49,524 KB
testcase_13 AC 44 ms
49,360 KB
testcase_14 AC 44 ms
49,456 KB
testcase_15 AC 44 ms
49,412 KB
testcase_16 AC 44 ms
49,280 KB
testcase_17 AC 44 ms
49,412 KB
testcase_18 AC 45 ms
49,424 KB
testcase_19 AC 44 ms
49,252 KB
testcase_20 AC 44 ms
49,364 KB
testcase_21 AC 42 ms
49,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static java.lang.System.in;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String[] inputs = reader.readLine().split(" ");
        long H = Long.parseLong(inputs[0]);
        long W = Long.parseLong(inputs[1]);
        long N = Long.parseLong(inputs[2]);
        long K = Long.parseLong(inputs[3]);
        if ((H * W) % N == 0 && N == K) {
            System.out.println("YES");
        } else if ((H * W) % N == K) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
}
0