結果

問題 No.278 連続する整数の和(2)
ユーザー ああいいああいい
提出日時 2021-12-24 14:49:38
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 350 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 60 ms
使用メモリ 9,772 KB
最終ジャッジ日時 2023-03-27 17:47:02
合計ジャッジ時間 4,187 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 15 ms
7,716 KB
testcase_01 AC 14 ms
7,692 KB
testcase_02 AC 295 ms
7,720 KB
testcase_03 AC 15 ms
7,720 KB
testcase_04 AC 15 ms
7,768 KB
testcase_05 AC 19 ms
7,764 KB
testcase_06 AC 21 ms
9,668 KB
testcase_07 AC 22 ms
9,712 KB
testcase_08 AC 279 ms
9,772 KB
testcase_09 AC 278 ms
7,656 KB
testcase_10 AC 350 ms
9,728 KB
testcase_11 AC 270 ms
7,648 KB
testcase_12 AC 15 ms
7,712 KB
testcase_13 AC 230 ms
9,756 KB
testcase_14 AC 185 ms
9,732 KB
testcase_15 AC 205 ms
7,612 KB
testcase_16 AC 163 ms
7,652 KB
testcase_17 AC 285 ms
7,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
l = []
if N & 1 == 0:
    N //= 2
i = 1
while i * i <= N:
    if N % i == 0:
        l.append(i)
        if i != N // i:
            l.append(N // i)
    i += 1
print(sum(l))
0