結果

問題 No.384 マス埋めゲーム2
ユーザー uafr_csuafr_cs
提出日時 2016-07-02 01:20:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 1,000 ms
コード長 433 bytes
コンパイル時間 2,555 ms
コンパイル使用メモリ 78,812 KB
実行使用メモリ 41,508 KB
最終ジャッジ日時 2024-04-20 06:45:24
合計ジャッジ時間 6,425 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
39,852 KB
testcase_01 AC 119 ms
39,912 KB
testcase_02 AC 133 ms
40,968 KB
testcase_03 AC 135 ms
41,128 KB
testcase_04 AC 134 ms
41,364 KB
testcase_05 AC 140 ms
41,192 KB
testcase_06 AC 121 ms
39,924 KB
testcase_07 AC 137 ms
41,160 KB
testcase_08 AC 133 ms
41,496 KB
testcase_09 AC 136 ms
41,096 KB
testcase_10 AC 134 ms
41,468 KB
testcase_11 AC 146 ms
41,508 KB
testcase_12 AC 122 ms
40,252 KB
testcase_13 AC 121 ms
40,108 KB
testcase_14 AC 135 ms
41,228 KB
testcase_15 AC 136 ms
41,188 KB
testcase_16 AC 135 ms
41,392 KB
testcase_17 AC 134 ms
41,464 KB
testcase_18 AC 142 ms
41,068 KB
testcase_19 AC 133 ms
41,336 KB
testcase_20 AC 139 ms
41,372 KB
testcase_21 AC 138 ms
41,100 KB
testcase_22 AC 133 ms
41,200 KB
testcase_23 AC 135 ms
41,056 KB
testcase_24 AC 135 ms
41,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		final long H = sc.nextLong();
		final long W = sc.nextLong();
		final long N = sc.nextLong();
		final long K = sc.nextLong();
		
		System.out.println((H + W - 1) % N == K % N ? "YES" : "NO");
	}

}
0