結果
| 問題 | No.166 マス埋めゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-24 14:17:31 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 57 ms / 1,000 ms |
| + 566µs | |
| コード長 | 504 bytes |
| 記録 | |
| コンパイル時間 | 1,337 ms |
| コンパイル使用メモリ | 84,596 KB |
| 実行使用メモリ | 43,428 KB |
| 最終ジャッジ日時 | 2026-08-26 03:45:57 |
| 合計ジャッジ時間 | 3,918 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
BigInteger H = new BigInteger(sc.next());
BigInteger W = new BigInteger(sc.next());
BigInteger N = new BigInteger(sc.next());
BigInteger K = new BigInteger(sc.next());
System.out.println((H.multiply(W).subtract(BigInteger.ONE).mod(N).add(BigInteger.ONE).compareTo(K) == 0)? "YES" : "NO");
}
}