結果

問題 No.166 マス埋めゲーム
ユーザー 37zigen37zigen
提出日時 2016-03-31 12:08:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 359 bytes
コンパイル時間 2,002 ms
コンパイル使用メモリ 74,292 KB
実行使用メモリ 54,380 KB
最終ジャッジ日時 2024-04-10 06:43:53
合計ジャッジ時間 5,708 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
54,152 KB
testcase_01 AC 113 ms
53,160 KB
testcase_02 AC 125 ms
54,120 KB
testcase_03 AC 126 ms
54,048 KB
testcase_04 AC 126 ms
54,172 KB
testcase_05 AC 126 ms
54,200 KB
testcase_06 AC 124 ms
53,836 KB
testcase_07 AC 123 ms
53,844 KB
testcase_08 AC 123 ms
54,172 KB
testcase_09 AC 122 ms
54,120 KB
testcase_10 AC 111 ms
52,740 KB
testcase_11 AC 126 ms
54,148 KB
testcase_12 WA -
testcase_13 RE -
testcase_14 RE -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 124 ms
54,212 KB
testcase_18 WA -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder166;
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();
		if(k==n)k=0;
		int mod=(h*w)%n;
		if(mod==k){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}
}
0