結果

問題 No.384 マス埋めゲーム2
ユーザー リチウムリチウム
提出日時 2016-07-01 23:33:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 1,000 ms
コード長 358 bytes
コンパイル時間 3,079 ms
コンパイル使用メモリ 74,460 KB
実行使用メモリ 54,312 KB
最終ジャッジ日時 2024-04-20 06:15:18
合計ジャッジ時間 7,089 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
54,312 KB
testcase_01 AC 117 ms
53,448 KB
testcase_02 AC 133 ms
54,220 KB
testcase_03 AC 128 ms
54,224 KB
testcase_04 AC 122 ms
53,984 KB
testcase_05 AC 111 ms
53,964 KB
testcase_06 AC 112 ms
54,052 KB
testcase_07 AC 114 ms
54,096 KB
testcase_08 AC 128 ms
54,296 KB
testcase_09 AC 106 ms
52,964 KB
testcase_10 AC 117 ms
54,108 KB
testcase_11 AC 119 ms
53,968 KB
testcase_12 AC 137 ms
53,100 KB
testcase_13 AC 138 ms
53,824 KB
testcase_14 AC 114 ms
52,948 KB
testcase_15 AC 138 ms
54,032 KB
testcase_16 AC 108 ms
52,428 KB
testcase_17 AC 104 ms
52,880 KB
testcase_18 AC 120 ms
54,060 KB
testcase_19 AC 117 ms
53,784 KB
testcase_20 AC 105 ms
52,720 KB
testcase_21 AC 116 ms
54,064 KB
testcase_22 AC 113 ms
53,796 KB
testcase_23 AC 105 ms
53,048 KB
testcase_24 AC 135 ms
53,956 KB
権限があれば一括ダウンロードができます

ソースコード

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

}
0