結果

問題 No.1256 連続整数列
ユーザー chineristACchineristAC
提出日時 2020-10-16 23:24:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 621 ms
コンパイル使用メモリ 87,312 KB
実行使用メモリ 76,108 KB
最終ジャッジ日時 2023-09-28 08:18:28
合計ジャッジ時間 2,962 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,620 KB
testcase_01 AC 61 ms
71,248 KB
testcase_02 AC 67 ms
75,904 KB
testcase_03 AC 65 ms
75,812 KB
testcase_04 AC 63 ms
71,324 KB
testcase_05 AC 63 ms
71,396 KB
testcase_06 AC 65 ms
75,892 KB
testcase_07 AC 65 ms
75,956 KB
testcase_08 AC 66 ms
76,012 KB
testcase_09 AC 61 ms
71,148 KB
testcase_10 AC 66 ms
75,972 KB
testcase_11 AC 67 ms
75,972 KB
testcase_12 AC 66 ms
76,044 KB
testcase_13 AC 66 ms
76,108 KB
testcase_14 AC 66 ms
76,016 KB
testcase_15 AC 65 ms
75,984 KB
testcase_16 AC 66 ms
75,948 KB
testcase_17 AC 67 ms
75,692 KB
testcase_18 AC 65 ms
75,680 KB
testcase_19 AC 65 ms
75,988 KB
testcase_20 AC 66 ms
75,964 KB
testcase_21 AC 64 ms
75,964 KB
testcase_22 AC 64 ms
75,916 KB
testcase_23 AC 64 ms
75,776 KB
testcase_24 AC 64 ms
75,696 KB
testcase_25 AC 66 ms
75,864 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:
    if k<3:
        continue
    S = (2*A)//k - k + 1
    if S%2==0:
        exit(print("YES"))

print("NO")
0