結果

問題 No.888 約数の総和
ユーザー mlihua09mlihua09
提出日時 2020-08-31 17:34:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 86,940 KB
実行使用メモリ 76,440 KB
最終ジャッジ日時 2023-08-10 07:53:26
合計ジャッジ時間 5,058 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,724 KB
testcase_01 AC 73 ms
71,860 KB
testcase_02 AC 72 ms
71,736 KB
testcase_03 AC 78 ms
71,332 KB
testcase_04 AC 69 ms
71,672 KB
testcase_05 AC 70 ms
71,956 KB
testcase_06 AC 71 ms
71,756 KB
testcase_07 AC 72 ms
71,736 KB
testcase_08 AC 71 ms
71,756 KB
testcase_09 AC 71 ms
71,736 KB
testcase_10 AC 72 ms
71,744 KB
testcase_11 AC 75 ms
71,732 KB
testcase_12 AC 72 ms
71,860 KB
testcase_13 AC 73 ms
71,740 KB
testcase_14 AC 71 ms
71,692 KB
testcase_15 AC 73 ms
71,780 KB
testcase_16 AC 74 ms
71,772 KB
testcase_17 AC 75 ms
71,760 KB
testcase_18 AC 107 ms
76,268 KB
testcase_19 AC 98 ms
76,224 KB
testcase_20 AC 89 ms
76,336 KB
testcase_21 AC 105 ms
76,336 KB
testcase_22 AC 105 ms
76,088 KB
testcase_23 AC 75 ms
76,268 KB
testcase_24 AC 87 ms
76,244 KB
testcase_25 AC 91 ms
76,160 KB
testcase_26 AC 93 ms
76,244 KB
testcase_27 AC 99 ms
76,376 KB
testcase_28 AC 99 ms
76,340 KB
testcase_29 AC 101 ms
76,304 KB
testcase_30 AC 101 ms
76,144 KB
testcase_31 AC 103 ms
76,440 KB
testcase_32 AC 108 ms
76,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


N = int(input())

ans = 1

for i in range(2, int(N ** 0.5) + 1):
    
    x = i
    
    while N % i == 0:
        
        x *= i
        
        N //= i
        
    x -= 1
    x //= i - 1
    ans *= x

if N != 1:
    ans *= N + 1
    
print(ans)
    
0