結果

問題 No.384 マス埋めゲーム2
ユーザー リチウムリチウム
提出日時 2016-07-01 23:19:19
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 353 bytes
コンパイル時間 3,242 ms
コンパイル使用メモリ 74,352 KB
実行使用メモリ 54,392 KB
最終ジャッジ日時 2024-04-20 06:07:29
合計ジャッジ時間 7,501 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
54,392 KB
testcase_01 RE -
testcase_02 AC 133 ms
54,260 KB
testcase_03 AC 132 ms
54,116 KB
testcase_04 AC 134 ms
54,308 KB
testcase_05 AC 136 ms
54,124 KB
testcase_06 AC 133 ms
54,216 KB
testcase_07 AC 133 ms
53,932 KB
testcase_08 AC 134 ms
54,276 KB
testcase_09 AC 134 ms
54,232 KB
testcase_10 AC 130 ms
54,088 KB
testcase_11 AC 139 ms
54,056 KB
testcase_12 AC 132 ms
54,252 KB
testcase_13 AC 135 ms
54,272 KB
testcase_14 AC 130 ms
54,244 KB
testcase_15 AC 132 ms
54,152 KB
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 134 ms
54,224 KB
testcase_19 AC 131 ms
54,176 KB
testcase_20 AC 132 ms
54,088 KB
testcase_21 AC 133 ms
53,868 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

package test;

import java.util.Scanner;


public class atc {

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

}
0