結果

問題 No.166 マス埋めゲーム
ユーザー kenkooookenkoooo
提出日時 2015-03-19 23:48:18
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 1,995 ms
コンパイル使用メモリ 72,100 KB
実行使用メモリ 56,432 KB
最終ジャッジ日時 2023-09-11 08:44:33
合計ジャッジ時間 5,776 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 125 ms
55,924 KB
testcase_02 AC 123 ms
55,876 KB
testcase_03 AC 122 ms
55,760 KB
testcase_04 AC 121 ms
55,576 KB
testcase_05 AC 122 ms
55,500 KB
testcase_06 WA -
testcase_07 AC 127 ms
55,476 KB
testcase_08 AC 123 ms
55,904 KB
testcase_09 AC 123 ms
55,812 KB
testcase_10 AC 123 ms
55,640 KB
testcase_11 AC 124 ms
55,940 KB
testcase_12 AC 125 ms
55,856 KB
testcase_13 AC 124 ms
55,924 KB
testcase_14 AC 124 ms
55,380 KB
testcase_15 AC 125 ms
55,588 KB
testcase_16 AC 123 ms
55,764 KB
testcase_17 WA -
testcase_18 AC 124 ms
55,784 KB
testcase_19 AC 125 ms
55,580 KB
testcase_20 AC 124 ms
53,916 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

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();

		H %= N;
		W %= N;

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

		}

	}
}
0