結果

問題 No.1256 連続整数列
ユーザー chineristACchineristAC
提出日時 2020-10-16 23:23:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 76,128 KB
最終ジャッジ日時 2023-09-28 07:02:16
合計ジャッジ時間 2,979 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,372 KB
testcase_01 AC 63 ms
71,292 KB
testcase_02 AC 70 ms
75,940 KB
testcase_03 AC 69 ms
76,036 KB
testcase_04 AC 64 ms
71,280 KB
testcase_05 AC 61 ms
71,436 KB
testcase_06 AC 65 ms
76,008 KB
testcase_07 AC 69 ms
75,740 KB
testcase_08 AC 66 ms
76,032 KB
testcase_09 WA -
testcase_10 AC 65 ms
76,020 KB
testcase_11 AC 64 ms
76,024 KB
testcase_12 AC 65 ms
76,000 KB
testcase_13 AC 64 ms
75,948 KB
testcase_14 AC 68 ms
75,888 KB
testcase_15 AC 68 ms
75,776 KB
testcase_16 AC 67 ms
76,052 KB
testcase_17 AC 67 ms
76,040 KB
testcase_18 AC 67 ms
75,744 KB
testcase_19 AC 66 ms
76,124 KB
testcase_20 AC 67 ms
76,128 KB
testcase_21 AC 66 ms
75,716 KB
testcase_22 AC 65 ms
75,892 KB
testcase_23 AC 68 ms
75,972 KB
testcase_24 AC 64 ms
76,080 KB
testcase_25 AC 66 ms
76,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def divisors(M):#Mの約数列 O(n^(0.5+e))
    import math
    d=[]
    i=1
    while math.sqrt(M)>=i:
        if M%i==0:
            d.append(i)
            if i**2!=M:
                d.append(M//i)
        i=i+1
    d.sort()
    return d

A = int(input())
div = divisors(2*A)
for k in div:
    S = (2*A)//k - k + 1
    if S%2==0:
        exit(print("YES"))

print("NO")
0