結果

問題 No.166 マス埋めゲーム
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-05 23:45:54
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 663 bytes
コンパイル時間 1,921 ms
コンパイル使用メモリ 71,248 KB
実行使用メモリ 58,528 KB
最終ジャッジ日時 2023-09-17 04:44:52
合計ジャッジ時間 6,554 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,892 KB
testcase_01 AC 122 ms
56,076 KB
testcase_02 AC 124 ms
56,048 KB
testcase_03 AC 124 ms
55,988 KB
testcase_04 AC 125 ms
55,956 KB
testcase_05 AC 124 ms
55,736 KB
testcase_06 AC 123 ms
55,868 KB
testcase_07 AC 122 ms
55,872 KB
testcase_08 AC 123 ms
56,416 KB
testcase_09 AC 122 ms
55,720 KB
testcase_10 AC 123 ms
56,060 KB
testcase_11 AC 124 ms
56,124 KB
testcase_12 WA -
testcase_13 RE -
testcase_14 RE -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 121 ms
55,904 KB
testcase_18 WA -
testcase_19 RE -
testcase_20 RE -
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);
        int h = koko.nextInt();
        int w = koko.nextInt();
        int n = koko.nextInt();
        int k = koko.nextInt();
        int 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