結果

問題 No.166 マス埋めゲーム
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-05 23:52:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 1,000 ms
コード長 672 bytes
コンパイル時間 2,002 ms
コンパイル使用メモリ 71,372 KB
実行使用メモリ 56,604 KB
最終ジャッジ日時 2023-09-17 04:46:44
合計ジャッジ時間 5,773 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
56,604 KB
testcase_01 AC 121 ms
56,044 KB
testcase_02 AC 114 ms
55,764 KB
testcase_03 AC 114 ms
56,140 KB
testcase_04 AC 113 ms
56,048 KB
testcase_05 AC 114 ms
56,244 KB
testcase_06 AC 114 ms
56,096 KB
testcase_07 AC 114 ms
56,024 KB
testcase_08 AC 116 ms
56,028 KB
testcase_09 AC 117 ms
56,020 KB
testcase_10 AC 116 ms
55,968 KB
testcase_11 AC 116 ms
55,536 KB
testcase_12 AC 117 ms
56,184 KB
testcase_13 AC 115 ms
55,788 KB
testcase_14 AC 113 ms
56,020 KB
testcase_15 AC 114 ms
56,064 KB
testcase_16 AC 117 ms
55,824 KB
testcase_17 AC 113 ms
55,820 KB
testcase_18 AC 113 ms
56,396 KB
testcase_19 AC 114 ms
55,940 KB
testcase_20 AC 119 ms
56,076 KB
testcase_21 AC 112 ms
56,052 KB
権限があれば一括ダウンロードができます

ソースコード

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();
        long k = koko.nextLong();
        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