結果
問題 | No.1198 お菓子配り-1 |
ユーザー |
![]() |
提出日時 | 2020-08-28 22:04:51 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 131 ms / 2,000 ms |
コード長 | 483 bytes |
コンパイル時間 | 3,476 ms |
コンパイル使用メモリ | 74,536 KB |
実行使用メモリ | 41,428 KB |
最終ジャッジ日時 | 2024-11-16 09:27:00 |
合計ジャッジ時間 | 6,296 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 14 |
ソースコード
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);}}}