結果

問題 No.166 マス埋めゲーム
ユーザー jimanojimano
提出日時 2018-02-10 16:12:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 574 bytes
コンパイル時間 3,691 ms
コンパイル使用メモリ 73,420 KB
実行使用メモリ 37,060 KB
最終ジャッジ日時 2024-04-22 15:35:39
合計ジャッジ時間 5,050 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
36,892 KB
testcase_01 AC 51 ms
36,596 KB
testcase_02 AC 51 ms
36,512 KB
testcase_03 AC 51 ms
36,628 KB
testcase_04 AC 50 ms
36,912 KB
testcase_05 AC 52 ms
37,044 KB
testcase_06 AC 51 ms
36,892 KB
testcase_07 AC 52 ms
36,892 KB
testcase_08 AC 52 ms
36,748 KB
testcase_09 AC 51 ms
37,060 KB
testcase_10 AC 51 ms
37,020 KB
testcase_11 AC 51 ms
36,640 KB
testcase_12 AC 52 ms
36,924 KB
testcase_13 AC 52 ms
36,624 KB
testcase_14 AC 52 ms
36,888 KB
testcase_15 AC 49 ms
36,624 KB
testcase_16 AC 51 ms
36,772 KB
testcase_17 AC 50 ms
36,624 KB
testcase_18 AC 51 ms
36,956 KB
testcase_19 AC 49 ms
36,992 KB
testcase_20 AC 51 ms
36,624 KB
testcase_21 AC 51 ms
36,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder;

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

public class No0166 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] input = br.readLine().split(" "); 
		long h = Long.parseLong(input[0]);
		long w = Long.parseLong(input[1]);
		long n = Long.parseLong(input[2]);
		long k = Long.parseLong(input[3]);
		
		long hw = h * w;
		System.out.println((hw % n == k || hw % n == 0 && n == k) ? "YES" : "NO");
	}
}
0