human
Sum of all the prime divisors of a number | function to find prime divisors of all numbers from 1 to n.
if the number is prime.
add this prime to all it 's multiples.
Driver code"
How can the above be solved in Python?
 What is a code to sum of all the prime divisors of a number and the other steps required?
assistant
#Here is code to sum of all the prime divisors of a number and the other steps required.
 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 ]
N = 60
print ( " Sum ▁ of ▁ prime " , " divisors ▁ of ▁ 60 ▁ is " , Sum ( N ) ) ;