結果
問題 |
No.166 マス埋めゲーム
|
ユーザー |
|
提出日時 | 2018-02-10 16:05:01 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 556 bytes |
コンパイル時間 | 3,412 ms |
コンパイル使用メモリ | 74,576 KB |
実行使用メモリ | 50,584 KB |
最終ジャッジ日時 | 2024-10-14 14:18:23 |
合計ジャッジ時間 | 5,242 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 WA * 9 RE * 3 |
ソースコード
package me.yukicoder; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No0166 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] input = br.readLine().split(" "); int h = Integer.parseInt(input[0]); int w = Integer.parseInt(input[1]); long n = Long.parseLong(input[2]); int k = Integer.parseInt(input[3]); long hw = h * w; System.out.println((hw % n + n == k) ? "YES" : "NO"); } }