結果

問題 No.166 マス埋めゲーム
ユーザー wagasa2wagasa2
提出日時 2018-04-22 11:18:55
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 1,987 ms
コンパイル使用メモリ 71,224 KB
実行使用メモリ 58,088 KB
最終ジャッジ日時 2023-09-09 12:32:11
合計ジャッジ時間 6,113 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,444 KB
testcase_01 AC 123 ms
55,764 KB
testcase_02 AC 122 ms
55,800 KB
testcase_03 AC 126 ms
56,048 KB
testcase_04 AC 122 ms
56,356 KB
testcase_05 AC 123 ms
55,896 KB
testcase_06 AC 123 ms
55,436 KB
testcase_07 AC 123 ms
56,268 KB
testcase_08 AC 123 ms
55,988 KB
testcase_09 AC 124 ms
55,968 KB
testcase_10 AC 124 ms
55,768 KB
testcase_11 AC 126 ms
55,900 KB
testcase_12 WA -
testcase_13 RE -
testcase_14 RE -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 123 ms
55,720 KB
testcase_18 WA -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int w = sc.nextInt();
		int n = sc.nextInt();
		int k = sc.nextInt();

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