結果

問題 No.1256 連続整数列
ユーザー rei60rei60
提出日時 2020-10-25 17:39:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 515 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 75,752 KB
最終ジャッジ日時 2023-09-29 02:08:15
合計ジャッジ時間 3,743 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,096 KB
testcase_01 AC 72 ms
71,352 KB
testcase_02 AC 75 ms
75,420 KB
testcase_03 AC 74 ms
75,512 KB
testcase_04 AC 73 ms
71,380 KB
testcase_05 AC 76 ms
71,304 KB
testcase_06 AC 79 ms
75,364 KB
testcase_07 AC 77 ms
75,452 KB
testcase_08 AC 75 ms
75,440 KB
testcase_09 AC 74 ms
71,444 KB
testcase_10 AC 79 ms
75,452 KB
testcase_11 AC 81 ms
75,468 KB
testcase_12 AC 77 ms
75,456 KB
testcase_13 AC 74 ms
75,752 KB
testcase_14 AC 76 ms
75,456 KB
testcase_15 AC 78 ms
75,424 KB
testcase_16 AC 75 ms
75,460 KB
testcase_17 AC 75 ms
75,532 KB
testcase_18 AC 76 ms
75,428 KB
testcase_19 AC 76 ms
75,372 KB
testcase_20 AC 74 ms
75,432 KB
testcase_21 AC 75 ms
75,748 KB
testcase_22 AC 76 ms
75,596 KB
testcase_23 AC 73 ms
75,444 KB
testcase_24 AC 78 ms
75,476 KB
testcase_25 AC 78 ms
75,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

A = int(input())

def make_div(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

div = make_div(A)[1::]


for d in div:
    d *= 2
    temp = (2*A//d - d + 1)//2
    if temp-0.01 < (2*A/d - d + 1)/2 < temp+0.01:
        print("YES")
        quit()
print("NO")
    
0