結果

問題 No.166 マス埋めゲーム
ユーザー ちよちゃんちよちゃん
提出日時 2016-06-07 20:31:16
言語 Java21
(openjdk 21)
結果
AC  
実行時間 145 ms / 1,000 ms
コード長 506 bytes
コンパイル時間 3,610 ms
コンパイル使用メモリ 74,612 KB
実行使用メモリ 41,532 KB
最終ジャッジ日時 2024-04-17 06:05:33
合計ジャッジ時間 7,613 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
41,384 KB
testcase_01 AC 143 ms
41,228 KB
testcase_02 AC 143 ms
41,396 KB
testcase_03 AC 139 ms
41,036 KB
testcase_04 AC 145 ms
41,244 KB
testcase_05 AC 141 ms
41,112 KB
testcase_06 AC 141 ms
40,928 KB
testcase_07 AC 141 ms
41,400 KB
testcase_08 AC 144 ms
41,388 KB
testcase_09 AC 139 ms
41,116 KB
testcase_10 AC 141 ms
41,504 KB
testcase_11 AC 138 ms
41,116 KB
testcase_12 AC 140 ms
41,116 KB
testcase_13 AC 143 ms
41,532 KB
testcase_14 AC 139 ms
41,360 KB
testcase_15 AC 143 ms
41,400 KB
testcase_16 AC 144 ms
41,172 KB
testcase_17 AC 142 ms
41,112 KB
testcase_18 AC 141 ms
41,380 KB
testcase_19 AC 139 ms
41,148 KB
testcase_20 AC 137 ms
41,220 KB
testcase_21 AC 137 ms
41,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Yuki166 {
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long h = scan.nextLong();
		long w = scan.nextLong();
		long n = scan.nextLong();
		long k = scan.nextLong();
		scan.close();
		
		long mas = (h * w) % n;
		// System.out.println(mas);

		if( mas - k == 0){
			System.out.println("YES");
		}else if( mas == 0 && n == k){ 
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
	}	
}
0