結果
問題 | No.166 マス埋めゲーム |
ユーザー |
![]() |
提出日時 | 2015-04-05 23:52:07 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 130 ms / 1,000 ms |
コード長 | 672 bytes |
コンパイル時間 | 4,194 ms |
コンパイル使用メモリ | 73,740 KB |
実行使用メモリ | 54,212 KB |
最終ジャッジ日時 | 2024-07-04 02:15:31 |
合計ジャッジ時間 | 5,594 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
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"); } } } }