結果

問題 No.1198 お菓子配り-1
ユーザー ApassApass
提出日時 2020-08-28 21:54:20
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 3,238 ms
コンパイル使用メモリ 74,496 KB
実行使用メモリ 41,584 KB
最終ジャッジ日時 2024-04-26 12:53:26
合計ジャッジ時間 6,009 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
41,176 KB
testcase_01 AC 120 ms
41,584 KB
testcase_02 AC 112 ms
40,320 KB
testcase_03 AC 110 ms
41,304 KB
testcase_04 AC 113 ms
40,172 KB
testcase_05 AC 122 ms
41,060 KB
testcase_06 AC 111 ms
40,188 KB
testcase_07 AC 118 ms
40,908 KB
testcase_08 AC 120 ms
41,028 KB
testcase_09 AC 122 ms
41,164 KB
testcase_10 AC 111 ms
41,348 KB
testcase_11 AC 109 ms
40,600 KB
testcase_12 AC 109 ms
41,252 KB
testcase_13 AC 122 ms
41,360 KB
testcase_14 AC 120 ms
39,976 KB
testcase_15 AC 122 ms
41,260 KB
testcase_16 WA -
testcase_17 WA -
権限があれば一括ダウンロードができます

ソースコード

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.remainder(BigInteger.valueOf(4)).equals(BigInteger.ZERO)
                || N.remainder(BigInteger.TWO).equals(BigInteger.ONE)) {
            System.out.println(1);
        } else {
            System.out.println(-1);
        }
    }
}
0