結果

問題 No.166 マス埋めゲーム
ユーザー wagasa2wagasa2
提出日時 2018-04-22 11:27:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 1,000 ms
コード長 361 bytes
コンパイル時間 1,917 ms
コンパイル使用メモリ 72,028 KB
実行使用メモリ 56,632 KB
最終ジャッジ日時 2023-09-09 12:32:22
合計ジャッジ時間 5,611 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,344 KB
testcase_01 AC 120 ms
56,632 KB
testcase_02 AC 119 ms
55,776 KB
testcase_03 AC 119 ms
55,956 KB
testcase_04 AC 121 ms
56,012 KB
testcase_05 AC 121 ms
56,360 KB
testcase_06 AC 119 ms
53,776 KB
testcase_07 AC 119 ms
56,308 KB
testcase_08 AC 119 ms
55,804 KB
testcase_09 AC 120 ms
56,352 KB
testcase_10 AC 120 ms
55,820 KB
testcase_11 AC 119 ms
56,036 KB
testcase_12 AC 118 ms
55,800 KB
testcase_13 AC 118 ms
56,148 KB
testcase_14 AC 119 ms
55,604 KB
testcase_15 AC 120 ms
56,284 KB
testcase_16 AC 118 ms
56,396 KB
testcase_17 AC 119 ms
55,972 KB
testcase_18 AC 119 ms
56,052 KB
testcase_19 AC 119 ms
56,104 KB
testcase_20 AC 120 ms
56,188 KB
testcase_21 AC 119 ms
56,136 KB
権限があれば一括ダウンロードができます

ソースコード

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

		long loser = h * w % n == 0 ? n : h * w % n;
		if(k == loser) System.out.println("YES");
		else  System.out.println("NO");
	}
}
0