結果
問題 | No.1198 お菓子配り-1 |
ユーザー | uni_python |
提出日時 | 2020-08-28 21:32:15 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 774 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 87,296 KB |
実行使用メモリ | 76,272 KB |
最終ジャッジ日時 | 2023-08-08 20:12:18 |
合計ジャッジ時間 | 4,813 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 69 ms
76,272 KB |
testcase_01 | AC | 69 ms
71,812 KB |
testcase_02 | AC | 71 ms
71,716 KB |
testcase_03 | AC | 71 ms
71,940 KB |
testcase_04 | AC | 79 ms
75,848 KB |
testcase_05 | AC | 72 ms
71,724 KB |
testcase_06 | AC | 73 ms
75,712 KB |
testcase_07 | AC | 73 ms
75,656 KB |
testcase_08 | AC | 73 ms
75,620 KB |
testcase_09 | AC | 71 ms
75,920 KB |
testcase_10 | AC | 73 ms
75,740 KB |
testcase_11 | TLE | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
ソースコード
import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): mod=10**9+7 N=I() #約数列挙 def make_divisors(n): divisors = [] for i in range(1, int(n**0.5)+1): if n % i == 0: divisors.append(i) if i != n // i: divisors.append(n//i) divisors.sort() return divisors d=make_divisors(N) flag=0 for i in range(len(d)): a=d[i] b=d[-1-i] if b<=a: break if (b-a)%2==0: flag=1 break if flag: print(1) else: print(-1) main()