結果

問題 No.1256 連続整数列
ユーザー 👑 KazunKazun
提出日時 2020-10-16 21:28:30
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 449 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 75,848 KB
最終ジャッジ日時 2023-09-28 06:53:14
合計ジャッジ時間 2,941 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,632 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 65 ms
75,644 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 65 ms
75,184 KB
testcase_07 AC 65 ms
75,448 KB
testcase_08 AC 63 ms
75,388 KB
testcase_09 AC 61 ms
71,248 KB
testcase_10 AC 65 ms
75,392 KB
testcase_11 AC 66 ms
75,456 KB
testcase_12 AC 66 ms
75,128 KB
testcase_13 AC 66 ms
75,472 KB
testcase_14 AC 66 ms
75,480 KB
testcase_15 AC 63 ms
75,484 KB
testcase_16 AC 63 ms
75,644 KB
testcase_17 AC 64 ms
75,412 KB
testcase_18 AC 64 ms
75,420 KB
testcase_19 AC 65 ms
75,848 KB
testcase_20 AC 65 ms
75,240 KB
testcase_21 AC 64 ms
75,448 KB
testcase_22 AC 66 ms
75,412 KB
testcase_23 AC 65 ms
75,648 KB
testcase_24 AC 64 ms
75,264 KB
testcase_25 AC 67 ms
75,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#約数全部
def Divisors(N):
    N=abs(N)
    L,U=[],[]
    k=1
    while k*k <=N:
        if N%k== 0:
            L.append(k)
            if k!=N//k:
                U.append(N//k)
        k+=1
    return L+U[::-1]

A=int(input())
D=Divisors(2*A)

F=0
for n in D:
    if n<=2:
        continue

    if ((2*A)//n-n+1)&1:
        continue

    m=((2*A)//n-n+1)//2
    if m>=1:
        F=1
        break

if F:
    print("YES")
else:
    print("NO")
0