blob: 70449482c78381516c2e2adaa46ff2f8be0bc7fa (
plain)
1
2
3
4
5
6
7
|
def Sum(N):
SumOfPrimeDivisors = [0]*(N + 1)
for i in range(2,N + 1) :
if (SumOfPrimeDivisors[i] == 0) :
for j in range(i,N + 1,i) :
SumOfPrimeDivisors[j] += i
return SumOfPrimeDivisors[N]
|