結果

問題 No.166 マス埋めゲーム
ユーザー matsuyoshi30
提出日時 2016-02-10 22:23:46
言語 Java
(openjdk 23)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 421 bytes
コンパイル時間 1,968 ms
コンパイル使用メモリ 74,084 KB
実行使用メモリ 41,528 KB
最終ジャッジ日時 2024-09-22 00:04:36
合計ジャッジ時間 5,591 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        long h = in.nextLong();
        long w = in.nextLong();
        long n = in.nextLong();
        long k = in.nextLong();

        if((h*w) % n == k % n) {
            System.out.println("YES");
        } else { 
            System.out.println("NO");
        }
    }
}
0