結果

問題 No.1198 お菓子配り-1
ユーザー donutholedonuthole
提出日時 2020-08-29 00:25:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 631 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-04-28 01:35:00
合計ジャッジ時間 1,324 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
11,264 KB
testcase_01 AC 27 ms
11,264 KB
testcase_02 AC 29 ms
11,264 KB
testcase_03 AC 31 ms
11,392 KB
testcase_04 AC 29 ms
11,392 KB
testcase_05 AC 27 ms
11,392 KB
testcase_06 AC 28 ms
11,392 KB
testcase_07 AC 28 ms
11,392 KB
testcase_08 AC 27 ms
11,392 KB
testcase_09 AC 27 ms
11,392 KB
testcase_10 AC 28 ms
11,264 KB
testcase_11 AC 28 ms
11,392 KB
testcase_12 AC 28 ms
11,264 KB
testcase_13 AC 28 ms
11,392 KB
testcase_14 AC 28 ms
11,392 KB
testcase_15 AC 28 ms
11,264 KB
testcase_16 AC 27 ms
11,264 KB
testcase_17 AC 28 ms
11,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import math
import collections
import bisect
import itertools
import decimal

# import numpy as np

# sys.setrecursionlimit(10 ** 6)
INF = 10 ** 20
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline().rstrip())
ns = lambda: map(int, sys.stdin.readline().rstrip().split())
na = lambda: list(map(int, sys.stdin.readline().rstrip().split()))
na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().rstrip().split()))


# ===CODE===

def main():
    n = ni()

    d = [1, 4]
    flg = (n % 4 == 0 or n % 2) and n not in d
    print(1 if flg else -1)




if __name__ == '__main__':
    main()
0