結果

問題 No.384 マス埋めゲーム2
ユーザー fjafjafjafjafjafja
提出日時 2017-09-16 15:25:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 1,000 ms
コード長 396 bytes
コンパイル時間 3,710 ms
コンパイル使用メモリ 74,752 KB
実行使用メモリ 54,368 KB
最終ジャッジ日時 2024-04-25 14:38:03
合計ジャッジ時間 7,255 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
53,412 KB
testcase_01 AC 120 ms
54,272 KB
testcase_02 AC 122 ms
53,860 KB
testcase_03 AC 126 ms
54,104 KB
testcase_04 AC 120 ms
54,120 KB
testcase_05 AC 125 ms
53,992 KB
testcase_06 AC 125 ms
53,852 KB
testcase_07 AC 109 ms
54,232 KB
testcase_08 AC 119 ms
54,148 KB
testcase_09 AC 121 ms
54,084 KB
testcase_10 AC 120 ms
53,996 KB
testcase_11 AC 121 ms
54,340 KB
testcase_12 AC 120 ms
54,128 KB
testcase_13 AC 106 ms
52,968 KB
testcase_14 AC 120 ms
54,368 KB
testcase_15 AC 122 ms
54,180 KB
testcase_16 AC 122 ms
54,164 KB
testcase_17 AC 107 ms
53,152 KB
testcase_18 AC 125 ms
54,072 KB
testcase_19 AC 119 ms
54,020 KB
testcase_20 AC 125 ms
54,072 KB
testcase_21 AC 119 ms
54,000 KB
testcase_22 AC 128 ms
54,244 KB
testcase_23 AC 129 ms
54,000 KB
testcase_24 AC 121 ms
53,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class N384
{
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		long H=sc.nextLong(),W=sc.nextLong(),N=sc.nextLong(),K=sc.nextLong();
		long buf=H+W-2;long ans=0;
		if(buf==0){}
		else
		{
			if(buf%N==0){}
			else{ans=buf%N;}
		}
		if(ans+1==K){System.out.println("YES");}else{System.out.println("NO");}
	}

}
0