(n: int)
| 18 | |
| 19 | |
| 20 | def sum_of_divisors(n: int) -> int: |
| 21 | total = 0 |
| 22 | for i in range(1, int(sqrt(n) + 1)): |
| 23 | if n % i == 0 and i != sqrt(n): |
| 24 | total += i + n // i |
| 25 | elif i == sqrt(n): |
| 26 | total += i |
| 27 | return total - n |
| 28 | |
| 29 | |
| 30 | def solution(n: int = 10000) -> int: |