結果

問題 No.888 約数の総和
ユーザー stngstng
提出日時 2022-08-06 16:56:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 1,929 ms
コンパイル使用メモリ 86,776 KB
実行使用メモリ 75,932 KB
最終ジャッジ日時 2023-10-14 17:33:42
合計ジャッジ時間 4,972 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,564 KB
testcase_01 AC 76 ms
71,424 KB
testcase_02 AC 76 ms
71,588 KB
testcase_03 AC 78 ms
71,260 KB
testcase_04 AC 77 ms
71,660 KB
testcase_05 AC 77 ms
71,524 KB
testcase_06 AC 78 ms
71,712 KB
testcase_07 AC 79 ms
71,520 KB
testcase_08 AC 76 ms
71,380 KB
testcase_09 AC 76 ms
71,516 KB
testcase_10 AC 77 ms
71,460 KB
testcase_11 AC 77 ms
71,712 KB
testcase_12 AC 77 ms
71,700 KB
testcase_13 AC 77 ms
71,536 KB
testcase_14 AC 75 ms
71,592 KB
testcase_15 AC 77 ms
71,492 KB
testcase_16 AC 78 ms
71,732 KB
testcase_17 AC 78 ms
71,636 KB
testcase_18 AC 94 ms
75,556 KB
testcase_19 AC 90 ms
75,628 KB
testcase_20 AC 87 ms
75,484 KB
testcase_21 AC 113 ms
75,836 KB
testcase_22 AC 93 ms
75,496 KB
testcase_23 AC 81 ms
75,352 KB
testcase_24 AC 85 ms
75,476 KB
testcase_25 AC 87 ms
75,932 KB
testcase_26 AC 86 ms
75,576 KB
testcase_27 AC 91 ms
75,568 KB
testcase_28 AC 91 ms
75,652 KB
testcase_29 AC 91 ms
75,524 KB
testcase_30 AC 91 ms
75,272 KB
testcase_31 AC 92 ms
75,340 KB
testcase_32 AC 94 ms
75,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

n = int(input())
print(sum(make_divisors(n)))
0