結果

問題 No.1198 お菓子配り-1
ユーザー uni_pythonuni_python
提出日時 2020-08-28 21:34:05
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 625 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 87,300 KB
実行使用メモリ 80,400 KB
最終ジャッジ日時 2023-08-08 20:12:45
合計ジャッジ時間 4,766 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
76,060 KB
testcase_01 AC 70 ms
71,940 KB
testcase_02 AC 69 ms
71,508 KB
testcase_03 AC 71 ms
71,888 KB
testcase_04 AC 71 ms
75,600 KB
testcase_05 AC 70 ms
71,516 KB
testcase_06 AC 73 ms
75,816 KB
testcase_07 AC 72 ms
75,732 KB
testcase_08 AC 73 ms
75,880 KB
testcase_09 AC 73 ms
75,968 KB
testcase_10 AC 73 ms
75,888 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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):
        flag=0
        for i in range(1, int(n**0.5)+1):
            if n % i == 0:
                a=i
                b=n //i
                if i != n // i:
                    if (a-b)%2==0:
                        flag=1
                    

        return flag
    
    flag=make_divisors(N)
    
    if flag:
        print(1)
    else:
        print(-1)

        
    


main()
0