結果

問題 No.278 連続する整数の和(2)
ユーザー nebukuro09nebukuro09
提出日時 2016-09-20 15:10:08
言語 Python2
(2.7.18)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 64 ms
使用メモリ 6,368 KB
最終ジャッジ日時 2023-01-12 16:03:36
合計ジャッジ時間 2,311 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 11 ms
6,268 KB
testcase_01 AC 11 ms
6,060 KB
testcase_02 AC 112 ms
6,204 KB
testcase_03 AC 11 ms
6,288 KB
testcase_04 AC 11 ms
6,284 KB
testcase_05 AC 13 ms
6,068 KB
testcase_06 AC 14 ms
6,072 KB
testcase_07 AC 14 ms
6,108 KB
testcase_08 AC 106 ms
6,156 KB
testcase_09 AC 105 ms
6,092 KB
testcase_10 AC 132 ms
6,080 KB
testcase_11 AC 103 ms
6,080 KB
testcase_12 AC 11 ms
6,212 KB
testcase_13 AC 88 ms
6,208 KB
testcase_14 AC 72 ms
6,088 KB
testcase_15 AC 78 ms
6,368 KB
testcase_16 AC 64 ms
6,080 KB
testcase_17 AC 109 ms
6,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = input()
K = N/(2-(N%2))
ans = []
for n in xrange(1, int(math.sqrt(K))+1):
    if K%n == 0:
        ans.append(n)
        if n*n < K:
            ans.append(K/n)
print sum(ans)
0