結果

問題 No.1198 お菓子配り-1
ユーザー ApassApass
提出日時 2020-08-28 22:04:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 483 bytes
コンパイル時間 4,140 ms
コンパイル使用メモリ 71,848 KB
実行使用メモリ 56,280 KB
最終ジャッジ日時 2023-08-10 07:56:38
合計ジャッジ時間 6,436 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,948 KB
testcase_01 AC 119 ms
56,196 KB
testcase_02 AC 120 ms
56,192 KB
testcase_03 AC 118 ms
55,908 KB
testcase_04 AC 126 ms
55,820 KB
testcase_05 AC 123 ms
55,864 KB
testcase_06 AC 124 ms
56,156 KB
testcase_07 AC 124 ms
56,032 KB
testcase_08 AC 123 ms
55,552 KB
testcase_09 AC 127 ms
56,116 KB
testcase_10 AC 124 ms
55,984 KB
testcase_11 AC 124 ms
56,280 KB
testcase_12 AC 118 ms
55,744 KB
testcase_13 AC 123 ms
55,964 KB
testcase_14 AC 123 ms
55,844 KB
testcase_15 AC 120 ms
56,184 KB
testcase_16 AC 118 ms
55,968 KB
testcase_17 AC 119 ms
55,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.*;

public class A_ {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger N = sc.nextBigInteger();

        if (N.equals(BigInteger.valueOf(1))
                || N.equals(BigInteger.valueOf(4))
                || N.remainder(BigInteger.valueOf(4)).equals(BigInteger.TWO)) {
            System.out.println(-1);
        } else {
            System.out.println(1);
        }
    }
}
0