結果

問題 No.166 マス埋めゲーム
ユーザー 37zigen37zigen
提出日時 2016-03-31 12:10:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 376 bytes
コンパイル時間 2,095 ms
コンパイル使用メモリ 74,436 KB
実行使用メモリ 54,472 KB
最終ジャッジ日時 2024-04-10 06:44:07
合計ジャッジ時間 5,821 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
54,296 KB
testcase_01 AC 122 ms
54,472 KB
testcase_02 AC 123 ms
53,860 KB
testcase_03 AC 125 ms
54,108 KB
testcase_04 AC 126 ms
53,952 KB
testcase_05 AC 127 ms
54,236 KB
testcase_06 AC 127 ms
54,196 KB
testcase_07 AC 129 ms
54,128 KB
testcase_08 AC 125 ms
54,360 KB
testcase_09 AC 123 ms
54,044 KB
testcase_10 AC 126 ms
54,108 KB
testcase_11 AC 121 ms
54,120 KB
testcase_12 AC 125 ms
53,884 KB
testcase_13 AC 130 ms
54,212 KB
testcase_14 AC 133 ms
54,216 KB
testcase_15 AC 129 ms
54,044 KB
testcase_16 AC 127 ms
54,236 KB
testcase_17 AC 126 ms
54,052 KB
testcase_18 AC 121 ms
54,392 KB
testcase_19 AC 124 ms
54,160 KB
testcase_20 AC 116 ms
53,052 KB
testcase_21 AC 129 ms
54,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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