結果

問題 No.166 マス埋めゲーム
ユーザー chiho_miyako
提出日時 2015-04-05 23:45:54
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 663 bytes
コンパイル時間 2,166 ms
コンパイル使用メモリ 74,216 KB
実行使用メモリ 54,264 KB
最終ジャッジ日時 2024-07-04 02:13:55
合計ジャッジ時間 4,991 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 WA * 4 RE * 5
権限があれば一括ダウンロードができます

ソースコード

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