結果

問題 No.1198 お菓子配り-1
ユーザー uni_pythonuni_python
提出日時 2020-08-28 21:35:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 655 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,928 KB
実行使用メモリ 16,328 KB
最終ジャッジ日時 2023-08-08 20:14:23
合計ジャッジ時間 4,027 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
16,328 KB
testcase_01 AC 14 ms
7,816 KB
testcase_02 AC 15 ms
7,924 KB
testcase_03 AC 14 ms
7,924 KB
testcase_04 AC 15 ms
7,832 KB
testcase_05 AC 15 ms
7,820 KB
testcase_06 AC 15 ms
7,760 KB
testcase_07 AC 14 ms
7,816 KB
testcase_08 AC 14 ms
7,832 KB
testcase_09 AC 15 ms
7,820 KB
testcase_10 AC 14 ms
7,808 KB
testcase_11 AC 15 ms
7,748 KB
testcase_12 TLE -
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
                        break
                    

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

        
    


main()
0