結果

問題 No.166 マス埋めゲーム
ユーザー mits58mits58
提出日時 2016-07-02 16:45:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 1,000 ms
コード長 355 bytes
コンパイル時間 2,577 ms
コンパイル使用メモリ 74,344 KB
実行使用メモリ 54,480 KB
最終ジャッジ日時 2024-04-20 05:56:00
合計ジャッジ時間 4,806 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
54,072 KB
testcase_01 AC 108 ms
53,412 KB
testcase_02 AC 113 ms
54,480 KB
testcase_03 AC 98 ms
52,732 KB
testcase_04 AC 99 ms
53,144 KB
testcase_05 AC 93 ms
52,612 KB
testcase_06 AC 107 ms
54,112 KB
testcase_07 AC 126 ms
54,444 KB
testcase_08 AC 112 ms
53,968 KB
testcase_09 AC 118 ms
53,960 KB
testcase_10 AC 110 ms
53,920 KB
testcase_11 AC 102 ms
53,020 KB
testcase_12 AC 114 ms
53,948 KB
testcase_13 AC 100 ms
53,036 KB
testcase_14 AC 104 ms
54,260 KB
testcase_15 AC 107 ms
54,296 KB
testcase_16 AC 110 ms
53,032 KB
testcase_17 AC 102 ms
53,036 KB
testcase_18 AC 99 ms
52,956 KB
testcase_19 AC 107 ms
54,272 KB
testcase_20 AC 108 ms
54,136 KB
testcase_21 AC 100 ms
53,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			long h=sc.nextLong();
			long w=sc.nextLong();
			long n=sc.nextLong();
			long k=sc.nextLong();
			if(((h*w)%n==0 ? n : (h*w)%n) == k) System.out.println("YES");
			else System.out.println("NO");
		}
	}
}
0