結果

問題 No.384 マス埋めゲーム2
ユーザー htensaihtensai
提出日時 2019-11-20 13:32:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 2,611 ms
コンパイル使用メモリ 74,808 KB
実行使用メモリ 54,372 KB
最終ジャッジ日時 2024-04-15 22:24:46
合計ジャッジ時間 6,081 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 RE -
testcase_02 AC 125 ms
41,240 KB
testcase_03 AC 124 ms
41,048 KB
testcase_04 AC 124 ms
41,240 KB
testcase_05 AC 117 ms
40,548 KB
testcase_06 AC 117 ms
40,448 KB
testcase_07 AC 125 ms
41,316 KB
testcase_08 AC 124 ms
41,260 KB
testcase_09 AC 112 ms
40,232 KB
testcase_10 AC 121 ms
41,100 KB
testcase_11 AC 110 ms
40,076 KB
testcase_12 AC 127 ms
41,792 KB
testcase_13 AC 114 ms
40,232 KB
testcase_14 AC 125 ms
41,120 KB
testcase_15 AC 127 ms
41,372 KB
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 127 ms
41,400 KB
testcase_19 AC 130 ms
41,060 KB
testcase_20 WA -
testcase_21 AC 134 ms
41,460 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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