結果

問題 No.278 連続する整数の和(2)
ユーザー titiatitia
提出日時 2022-09-21 00:11:54
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 219 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 72 ms
使用メモリ 7,900 KB
最終ジャッジ日時 2023-01-11 12:27:35
合計ジャッジ時間 3,297 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 15 ms
7,816 KB
testcase_01 AC 15 ms
7,716 KB
testcase_02 AC 188 ms
7,808 KB
testcase_03 AC 15 ms
7,812 KB
testcase_04 AC 15 ms
7,676 KB
testcase_05 AC 17 ms
7,844 KB
testcase_06 AC 18 ms
7,900 KB
testcase_07 AC 19 ms
7,792 KB
testcase_08 AC 175 ms
7,668 KB
testcase_09 AC 173 ms
7,764 KB
testcase_10 AC 219 ms
7,760 KB
testcase_11 AC 169 ms
7,764 KB
testcase_12 AC 16 ms
7,812 KB
testcase_13 AC 145 ms
7,764 KB
testcase_14 AC 116 ms
7,848 KB
testcase_15 AC 129 ms
7,800 KB
testcase_16 AC 104 ms
7,804 KB
testcase_17 AC 176 ms
7,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
if N%2==0:
    x=N//2
else:
    x=N

# xの約数の列挙
import math
xr=math.ceil(math.sqrt(x))

LIST=[]
for i in range(1,xr+1):
    if x%i==0:
        LIST.append(i)
        LIST.append(x//i)
ANS=0

for s in set(LIST):
    ANS+=s

print(ANS)
0