結果

問題 No.1198 お菓子配り-1
ユーザー bluemeganebluemegane
提出日時 2020-09-24 17:25:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 1,755 ms
コンパイル使用メモリ 62,896 KB
実行使用メモリ 22,852 KB
最終ジャッジ日時 2023-09-10 13:31:25
合計ジャッジ時間 3,756 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
20,696 KB
testcase_01 AC 58 ms
20,744 KB
testcase_02 AC 58 ms
18,648 KB
testcase_03 AC 59 ms
20,848 KB
testcase_04 AC 59 ms
20,872 KB
testcase_05 AC 57 ms
20,780 KB
testcase_06 AC 58 ms
20,728 KB
testcase_07 AC 59 ms
20,776 KB
testcase_08 AC 59 ms
20,804 KB
testcase_09 AC 58 ms
22,696 KB
testcase_10 AC 59 ms
20,624 KB
testcase_11 AC 60 ms
20,884 KB
testcase_12 AC 60 ms
18,756 KB
testcase_13 AC 61 ms
22,852 KB
testcase_14 AC 60 ms
20,792 KB
testcase_15 AC 59 ms
20,912 KB
testcase_16 AC 57 ms
20,764 KB
testcase_17 AC 58 ms
22,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System.Numerics;
using System;

public class Hello
{
    static void Main()
    {
        var n = BigInteger.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns(BigInteger n)
    {
        if (n == 1 | n == 4) { Console.WriteLine(-1); return; }
        Console.WriteLine(n % 4 == 0 | n % 2 != 0 ? 1 : -1);
    }
}
0