結果

問題 No.278 連続する整数の和(2)
ユーザー ああいいああいい
提出日時 2021-12-24 14:49:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 427 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 11,812 KB
実行使用メモリ 10,176 KB
最終ジャッジ日時 2023-10-19 17:00:19
合計ジャッジ時間 4,309 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,152 KB
testcase_01 AC 30 ms
10,152 KB
testcase_02 AC 356 ms
10,152 KB
testcase_03 AC 29 ms
10,152 KB
testcase_04 AC 28 ms
10,152 KB
testcase_05 AC 34 ms
10,152 KB
testcase_06 AC 41 ms
10,152 KB
testcase_07 AC 38 ms
10,176 KB
testcase_08 AC 328 ms
10,156 KB
testcase_09 AC 328 ms
10,156 KB
testcase_10 AC 427 ms
10,152 KB
testcase_11 AC 325 ms
10,152 KB
testcase_12 AC 28 ms
10,152 KB
testcase_13 AC 282 ms
10,152 KB
testcase_14 AC 220 ms
10,152 KB
testcase_15 AC 242 ms
10,152 KB
testcase_16 AC 198 ms
10,152 KB
testcase_17 AC 336 ms
10,152 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