結果

問題 No.384 マス埋めゲーム2
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-12-06 23:57:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 416 bytes
コンパイル時間 1,926 ms
コンパイル使用メモリ 71,972 KB
実行使用メモリ 57,464 KB
最終ジャッジ日時 2023-08-18 19:42:31
合計ジャッジ時間 6,307 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,872 KB
testcase_01 AC 128 ms
55,728 KB
testcase_02 AC 127 ms
55,708 KB
testcase_03 AC 125 ms
55,616 KB
testcase_04 AC 126 ms
55,892 KB
testcase_05 AC 129 ms
55,308 KB
testcase_06 AC 128 ms
53,836 KB
testcase_07 AC 127 ms
55,312 KB
testcase_08 AC 127 ms
55,392 KB
testcase_09 AC 127 ms
55,716 KB
testcase_10 AC 127 ms
55,580 KB
testcase_11 AC 127 ms
55,812 KB
testcase_12 AC 127 ms
55,624 KB
testcase_13 AC 131 ms
55,736 KB
testcase_14 AC 129 ms
55,808 KB
testcase_15 AC 128 ms
55,304 KB
testcase_16 AC 127 ms
55,796 KB
testcase_17 AC 128 ms
55,832 KB
testcase_18 AC 125 ms
55,544 KB
testcase_19 AC 127 ms
55,884 KB
testcase_20 AC 126 ms
55,628 KB
testcase_21 AC 128 ms
55,908 KB
testcase_22 AC 133 ms
55,584 KB
testcase_23 AC 128 ms
57,464 KB
testcase_24 AC 127 ms
55,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    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 L = (H+W-2)%N+1;
        if(K==L){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }
}
0