結果

問題 No.888 約数の総和
ユーザー mlihua09
提出日時 2020-08-31 17:34:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 373 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 58,496 KB
最終ジャッジ日時 2024-11-16 09:21:43
合計ジャッジ時間 2,792 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

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