Python Program for Find minimum sum of factors of number

 21 - Feb - 2022
 XpertPhp
 26

In this article, We will explain to you Python Program for find minimum sum of factors of number. so you can see our python example. Example

def findMinSum(num):
    sum = 0
    i = 2
    while(i * i <= num):
        while(num % i == 0):
            sum += i
            num /= i
        i += 1
    sum += num
    return sum
num = 12
print findMinSum(num)
Output
7