結果

問題 No.166 マス埋めゲーム
ユーザー kenkooookenkoooo
提出日時 2015-03-19 23:49:20
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 422 bytes
コンパイル時間 1,992 ms
コンパイル使用メモリ 74,384 KB
実行使用メモリ 54,320 KB
最終ジャッジ日時 2024-06-28 23:24:28
合計ジャッジ時間 5,685 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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();
		sc.close();

		H %= N;
		W %= N;

		long all = H * W;
		all %= N;
		if (all == K || (all == 0 && K == N)) {
			System.out.println("YES");
		} else {
			System.out.println("NO");

		}

	}
}
0