結果

問題 No.166 マス埋めゲーム
ユーザー ffmm00
提出日時 2015-06-08 07:35:03
言語 Java
(openjdk 23)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 374 bytes
コンパイル時間 3,034 ms
コンパイル使用メモリ 75,008 KB
実行使用メモリ 54,244 KB
最終ジャッジ日時 2024-07-06 14:42:27
合計ジャッジ時間 6,487 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class N166 {

	public static void main(String[] args) {

		Scanner sca = new Scanner(System.in);

		long H = sca.nextLong();
		long W = sca.nextLong();
		long N = sca.nextLong();
		long K = sca.nextLong();

		long M = (H * W) % N;

		if (K == M || (M == 0 && K == N))
			System.out.println("YES");
		else
			System.out.println("NO");

	}

}
0