結果

問題 No.384 マス埋めゲーム2
ユーザー htensai
提出日時 2020-02-03 17:31:28
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 1,000 ms
コード長 458 bytes
コンパイル時間 3,399 ms
コンパイル使用メモリ 77,560 KB
実行使用メモリ 41,456 KB
最終ジャッジ日時 2024-09-19 02:36:53
合計ジャッジ時間 7,779 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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