結果

問題 No.384 マス埋めゲーム2
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-12-06 23:55:46
言語 Java19
(openjdk 21)
結果
RE  
実行時間 -
コード長 407 bytes
コンパイル時間 2,244 ms
コンパイル使用メモリ 71,028 KB
実行使用メモリ 57,568 KB
最終ジャッジ日時 2023-08-18 19:42:24
合計ジャッジ時間 7,138 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,904 KB
testcase_01 RE -
testcase_02 AC 128 ms
55,904 KB
testcase_03 AC 128 ms
55,584 KB
testcase_04 AC 126 ms
55,732 KB
testcase_05 AC 128 ms
55,764 KB
testcase_06 AC 127 ms
55,772 KB
testcase_07 AC 129 ms
55,736 KB
testcase_08 AC 127 ms
55,824 KB
testcase_09 AC 128 ms
55,768 KB
testcase_10 AC 127 ms
55,816 KB
testcase_11 AC 129 ms
55,628 KB
testcase_12 AC 126 ms
55,804 KB
testcase_13 AC 126 ms
56,012 KB
testcase_14 AC 125 ms
55,540 KB
testcase_15 AC 125 ms
57,568 KB
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 127 ms
55,732 KB
testcase_19 AC 125 ms
55,908 KB
testcase_20 AC 126 ms
55,732 KB
testcase_21 AC 126 ms
55,304 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 L = (H+W-2)%N+1;
        if(K==L){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }
}
0