結果
問題 |
No.166 マス埋めゲーム
|
ユーザー |
![]() |
提出日時 | 2015-04-05 23:49:09 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 670 bytes |
コンパイル時間 | 1,798 ms |
コンパイル使用メモリ | 74,396 KB |
実行使用メモリ | 41,532 KB |
最終ジャッジ日時 | 2024-07-04 02:14:07 |
合計ジャッジ時間 | 4,971 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 17 RE * 3 |
ソースコード
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"); } } } }