結果

問題 No.166 マス埋めゲーム
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-22 10:59:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 1,000 ms
コード長 384 bytes
コンパイル時間 2,075 ms
コンパイル使用メモリ 74,476 KB
実行使用メモリ 54,356 KB
最終ジャッジ日時 2024-04-10 08:31:37
合計ジャッジ時間 5,724 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
54,184 KB
testcase_01 AC 104 ms
52,676 KB
testcase_02 AC 115 ms
54,112 KB
testcase_03 AC 116 ms
53,932 KB
testcase_04 AC 106 ms
52,736 KB
testcase_05 AC 114 ms
54,024 KB
testcase_06 AC 106 ms
53,132 KB
testcase_07 AC 119 ms
53,860 KB
testcase_08 AC 118 ms
53,920 KB
testcase_09 AC 117 ms
53,776 KB
testcase_10 AC 104 ms
52,812 KB
testcase_11 AC 111 ms
53,804 KB
testcase_12 AC 117 ms
54,060 KB
testcase_13 AC 108 ms
52,964 KB
testcase_14 AC 107 ms
52,828 KB
testcase_15 AC 116 ms
54,044 KB
testcase_16 AC 103 ms
52,636 KB
testcase_17 AC 106 ms
53,032 KB
testcase_18 AC 118 ms
54,284 KB
testcase_19 AC 117 ms
54,108 KB
testcase_20 AC 118 ms
54,356 KB
testcase_21 AC 102 ms
52,560 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();
    String ans = "NO";
    if(((H * W) % N) == K) ans = "YES";
    if(((H * W) % N) == 0 && K == N) ans = "YES";
    System.out.println(ans);
  }
}
0