結果

問題 No.166 マス埋めゲーム
ユーザー yagi2yagi2
提出日時 2017-04-24 14:17:31
言語 Java19
(openjdk 21)
結果
AC  
実行時間 122 ms / 1,000 ms
コード長 504 bytes
コンパイル時間 2,258 ms
コンパイル使用メモリ 72,200 KB
実行使用メモリ 56,348 KB
最終ジャッジ日時 2023-10-11 13:06:02
合計ジャッジ時間 5,984 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,420 KB
testcase_01 AC 119 ms
55,616 KB
testcase_02 AC 120 ms
55,628 KB
testcase_03 AC 118 ms
55,788 KB
testcase_04 AC 119 ms
56,084 KB
testcase_05 AC 119 ms
56,012 KB
testcase_06 AC 116 ms
55,860 KB
testcase_07 AC 116 ms
55,520 KB
testcase_08 AC 118 ms
55,820 KB
testcase_09 AC 117 ms
55,880 KB
testcase_10 AC 116 ms
56,092 KB
testcase_11 AC 117 ms
56,348 KB
testcase_12 AC 118 ms
55,476 KB
testcase_13 AC 119 ms
56,188 KB
testcase_14 AC 117 ms
55,792 KB
testcase_15 AC 116 ms
55,808 KB
testcase_16 AC 117 ms
56,112 KB
testcase_17 AC 116 ms
55,468 KB
testcase_18 AC 117 ms
55,928 KB
testcase_19 AC 120 ms
55,916 KB
testcase_20 AC 121 ms
55,772 KB
testcase_21 AC 122 ms
55,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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");
    }
}
0