結果

問題 No.888 約数の総和
ユーザー mojamojammojamojam
提出日時 2020-12-25 03:31:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 125 ms
コンパイル使用メモリ 11,732 KB
実行使用メモリ 10,284 KB
最終ジャッジ日時 2023-10-21 16:22:05
合計ジャッジ時間 3,903 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,096 KB
testcase_01 AC 25 ms
10,096 KB
testcase_02 AC 27 ms
10,096 KB
testcase_03 AC 27 ms
10,096 KB
testcase_04 AC 27 ms
10,096 KB
testcase_05 AC 26 ms
10,096 KB
testcase_06 AC 27 ms
10,096 KB
testcase_07 AC 26 ms
10,096 KB
testcase_08 AC 25 ms
10,096 KB
testcase_09 AC 29 ms
10,096 KB
testcase_10 AC 33 ms
10,096 KB
testcase_11 AC 27 ms
10,096 KB
testcase_12 AC 27 ms
10,096 KB
testcase_13 AC 26 ms
10,096 KB
testcase_14 AC 26 ms
10,096 KB
testcase_15 AC 26 ms
10,096 KB
testcase_16 AC 26 ms
10,096 KB
testcase_17 AC 26 ms
10,096 KB
testcase_18 AC 168 ms
10,100 KB
testcase_19 AC 130 ms
10,096 KB
testcase_20 AC 102 ms
10,096 KB
testcase_21 AC 170 ms
10,284 KB
testcase_22 AC 174 ms
10,100 KB
testcase_23 AC 32 ms
10,096 KB
testcase_24 AC 86 ms
10,096 KB
testcase_25 AC 100 ms
10,100 KB
testcase_26 AC 101 ms
10,096 KB
testcase_27 AC 138 ms
10,096 KB
testcase_28 AC 143 ms
10,096 KB
testcase_29 AC 146 ms
10,096 KB
testcase_30 AC 150 ms
10,096 KB
testcase_31 AC 156 ms
10,096 KB
testcase_32 AC 169 ms
10,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n = int(input())
divisor = []

for i in range(1, int(math.sqrt(n))+1):
    if (n % i == 0):
        divisor.append(i)
        if (not int(n / i) == i):
            divisor.append(int(n / i))
print(sum(divisor))
0