結果

問題 No.1198 お菓子配り-1
ユーザー Apass
提出日時 2020-08-28 21:54:20
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 3,616 ms
コンパイル使用メモリ 75,872 KB
実行使用メモリ 54,472 KB
最終ジャッジ日時 2024-11-14 00:16:31
合計ジャッジ時間 6,393 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 12 WA * 2
権限があれば一括ダウンロードができます

ソースコード

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