結果

問題 No.1198 お菓子配り-1
ユーザー uni_pythonuni_python
提出日時 2020-08-28 21:34:19
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 655 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 82,380 KB
実行使用メモリ 65,060 KB
最終ジャッジ日時 2024-04-26 12:38:36
合計ジャッジ時間 4,221 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
61,212 KB
testcase_01 AC 37 ms
52,480 KB
testcase_02 AC 37 ms
52,224 KB
testcase_03 AC 37 ms
51,968 KB
testcase_04 AC 38 ms
52,224 KB
testcase_05 AC 37 ms
52,096 KB
testcase_06 AC 36 ms
52,352 KB
testcase_07 AC 40 ms
57,088 KB
testcase_08 AC 37 ms
52,480 KB
testcase_09 AC 36 ms
52,096 KB
testcase_10 AC 35 ms
52,224 KB
testcase_11 AC 39 ms
52,480 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