Python 3, (削除) 69 (削除ここまで) 63(削除) 63 (削除ここまで) 59 bytes
4 bytes thanks to Dennis.
f=lambda n:n-1and max(j for j in range(1,n)if n%j<1)+f(n-1)or 0
I set the recursion limit to 2000 for this to work for 1000.
Python 3, (削除) 69 (削除ここまで) 63 bytes
f=lambda n:n-1and max(j for j in range(1,n)if n%j<1)+f(n-1)or 0
I set the recursion limit to 2000 for this to work for 1000.
Python 3, (削除) 69 (削除ここまで) (削除) 63 (削除ここまで) 59 bytes
4 bytes thanks to Dennis.
f=lambda n:n-1and max(j for j in range(1,n)if n%j<1)+f(n-1)
I set the recursion limit to 2000 for this to work for 1000.
Python 3, 69(削除) 69 (削除ここまで) 63 bytes
lambdaf=lambda n:sum(n-1and max(j for j in range(1,in)if i%j<1n%j<1)for i in range+f(2,n+1)n-1)or 0
I set the recursion limit to 2000 for this to work for 1000.