結果

問題 No.888 約数の総和
ユーザー NagisaNagisa
提出日時 2019-09-20 21:36:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 1,313 ms
コンパイル使用メモリ 86,664 KB
実行使用メモリ 75,684 KB
最終ジャッジ日時 2023-10-12 18:17:28
合計ジャッジ時間 5,413 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,140 KB
testcase_01 AC 72 ms
71,156 KB
testcase_02 AC 73 ms
71,208 KB
testcase_03 AC 71 ms
70,980 KB
testcase_04 AC 71 ms
71,132 KB
testcase_05 AC 71 ms
71,200 KB
testcase_06 AC 71 ms
71,020 KB
testcase_07 AC 72 ms
70,972 KB
testcase_08 AC 70 ms
71,084 KB
testcase_09 AC 71 ms
71,036 KB
testcase_10 AC 71 ms
71,160 KB
testcase_11 AC 73 ms
71,248 KB
testcase_12 AC 73 ms
71,028 KB
testcase_13 AC 72 ms
71,204 KB
testcase_14 AC 73 ms
71,328 KB
testcase_15 AC 72 ms
71,140 KB
testcase_16 AC 73 ms
71,276 KB
testcase_17 AC 72 ms
70,964 KB
testcase_18 AC 103 ms
75,380 KB
testcase_19 AC 85 ms
75,172 KB
testcase_20 AC 84 ms
75,448 KB
testcase_21 AC 96 ms
75,684 KB
testcase_22 AC 90 ms
75,532 KB
testcase_23 AC 76 ms
75,388 KB
testcase_24 AC 83 ms
75,532 KB
testcase_25 AC 84 ms
75,472 KB
testcase_26 AC 83 ms
75,524 KB
testcase_27 AC 86 ms
75,248 KB
testcase_28 AC 87 ms
75,384 KB
testcase_29 AC 86 ms
75,380 KB
testcase_30 AC 86 ms
75,400 KB
testcase_31 AC 89 ms
75,672 KB
testcase_32 AC 90 ms
75,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())
if N == 1:
    print(1)
    exit(0)

P = [1,N]
for k in range(2,math.floor(math.sqrt(N))+1):
    if N % k == 0:
        if k*k == N:
            P.append(k)
        else:
            P.append(k)
            P.append(N//k)
print(sum(P))
0