結果

問題 No.166 マス埋めゲーム
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-05 23:49:09
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 670 bytes
コンパイル時間 2,023 ms
コンパイル使用メモリ 71,556 KB
実行使用メモリ 57,732 KB
最終ジャッジ日時 2023-09-17 04:45:09
合計ジャッジ時間 5,959 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
57,732 KB
testcase_01 AC 125 ms
55,704 KB
testcase_02 AC 123 ms
55,772 KB
testcase_03 AC 123 ms
55,552 KB
testcase_04 AC 125 ms
55,660 KB
testcase_05 AC 125 ms
55,408 KB
testcase_06 AC 124 ms
55,724 KB
testcase_07 AC 123 ms
55,812 KB
testcase_08 AC 123 ms
55,712 KB
testcase_09 AC 123 ms
56,056 KB
testcase_10 AC 123 ms
55,912 KB
testcase_11 AC 123 ms
55,576 KB
testcase_12 AC 122 ms
56,276 KB
testcase_13 AC 123 ms
56,100 KB
testcase_14 RE -
testcase_15 AC 126 ms
56,036 KB
testcase_16 AC 124 ms
55,684 KB
testcase_17 AC 125 ms
55,836 KB
testcase_18 AC 126 ms
55,860 KB
testcase_19 RE -
testcase_20 AC 127 ms
55,608 KB
testcase_21 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner (System.in);
        long h = koko.nextLong();
        long w = koko.nextLong();
        long n = koko.nextLong();
        int k = koko.nextInt();
        long mass = h*w;
        if(n!=k){
            if(mass%n==k){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
        if(n==k){
            if(mass%n==0){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
}
0