結果

問題 No.384 マス埋めゲーム2
ユーザー tentententen
提出日時 2020-10-15 08:33:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 114 ms / 1,000 ms
コード長 373 bytes
コンパイル時間 2,955 ms
コンパイル使用メモリ 71,592 KB
実行使用メモリ 57,476 KB
最終ジャッジ日時 2023-09-28 01:05:54
合計ジャッジ時間 7,132 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
57,476 KB
testcase_01 AC 106 ms
56,100 KB
testcase_02 AC 108 ms
55,796 KB
testcase_03 AC 104 ms
56,068 KB
testcase_04 AC 108 ms
56,152 KB
testcase_05 AC 110 ms
55,816 KB
testcase_06 AC 109 ms
55,868 KB
testcase_07 AC 105 ms
56,036 KB
testcase_08 AC 105 ms
55,956 KB
testcase_09 AC 104 ms
55,744 KB
testcase_10 AC 109 ms
55,812 KB
testcase_11 AC 109 ms
55,896 KB
testcase_12 AC 110 ms
56,188 KB
testcase_13 AC 114 ms
55,580 KB
testcase_14 AC 112 ms
55,804 KB
testcase_15 AC 108 ms
56,172 KB
testcase_16 AC 106 ms
56,084 KB
testcase_17 AC 110 ms
55,516 KB
testcase_18 AC 109 ms
55,668 KB
testcase_19 AC 106 ms
55,908 KB
testcase_20 AC 108 ms
56,180 KB
testcase_21 AC 113 ms
55,884 KB
testcase_22 AC 108 ms
56,092 KB
testcase_23 AC 108 ms
56,096 KB
testcase_24 AC 109 ms
55,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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