結果
問題 | No.166 マス埋めゲーム |
ユーザー |
|
提出日時 | 2017-04-24 14:17:31 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 135 ms / 1,000 ms |
コード長 | 504 bytes |
コンパイル時間 | 2,379 ms |
コンパイル使用メモリ | 74,704 KB |
実行使用メモリ | 54,100 KB |
最終ジャッジ日時 | 2024-09-13 11:51:40 |
合計ジャッジ時間 | 6,087 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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");}}