結果

問題 No.278 連続する整数の和(2)
ユーザー niyarinniyarin
提出日時 2016-11-08 19:57:21
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 241 bytes
コンパイル時間 48 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 51,328 KB
最終ジャッジ日時 2024-05-03 23:45:38
合計ジャッジ時間 2,493 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,400 KB
testcase_01 AC 14 ms
6,528 KB
testcase_02 AC 158 ms
40,448 KB
testcase_03 AC 11 ms
6,400 KB
testcase_04 AC 11 ms
6,272 KB
testcase_05 AC 15 ms
7,296 KB
testcase_06 AC 16 ms
7,424 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 144 ms
38,272 KB
testcase_10 AC 186 ms
47,232 KB
testcase_11 WA -
testcase_12 AC 12 ms
6,272 KB
testcase_13 WA -
testcase_14 AC 100 ms
26,624 KB
testcase_15 AC 148 ms
38,144 KB
testcase_16 AC 119 ms
31,232 KB
testcase_17 AC 154 ms
38,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import *
N = input()
if N == 1:
    print 1
elif N == 2:
    print 1
else:
    v = N if N%2 else N/2
    ans = 0
    for i in range(1,int(sqrt(N))+1):
        if v % i == 0:
            ans += i
            ans += v/i
    print ans
0