import math
def factors(n):
    sum=0
    for i in range(1,int(math.sqrt(n))):
        if(n%i==0):
            if(n//i==i):
                sum+=i
            else:
                sum+=i+n//i
    return sum
print(factors(100))    

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: