fork download
  1. from math import sqrt
  2.  
  3. def suma_dzielnikow_2(n):
  4. suma = 1 + n
  5. for j in range(2, int(sqrt(n)) + 1):
  6. if n % j == 0:
  7. suma += j
  8. if j != n // j:
  9. suma += n // j
  10. return suma
  11.  
  12. print(suma_dzielnikow_2(100000000))
  13.  
Success #stdin #stdout 0.07s 14120KB
stdin
Standard input is empty
stdout
249511591