結果

問題 No.278 連続する整数の和(2)
ユーザー nebukuro09nebukuro09
提出日時 2016-09-20 15:10:08
言語 Python2
(2.7.18)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 6,580 KB
実行使用メモリ 6,308 KB
最終ジャッジ日時 2023-08-24 22:48:06
合計ジャッジ時間 2,152 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,096 KB
testcase_01 AC 12 ms
6,108 KB
testcase_02 AC 117 ms
6,104 KB
testcase_03 AC 11 ms
6,128 KB
testcase_04 AC 12 ms
6,128 KB
testcase_05 AC 13 ms
6,120 KB
testcase_06 AC 15 ms
6,132 KB
testcase_07 AC 15 ms
6,308 KB
testcase_08 AC 109 ms
6,108 KB
testcase_09 AC 110 ms
6,100 KB
testcase_10 AC 137 ms
6,220 KB
testcase_11 AC 107 ms
6,124 KB
testcase_12 AC 12 ms
6,124 KB
testcase_13 AC 92 ms
6,104 KB
testcase_14 AC 75 ms
6,068 KB
testcase_15 AC 81 ms
6,064 KB
testcase_16 AC 66 ms
6,060 KB
testcase_17 AC 112 ms
6,128 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