問8
import math
def question8(n):
res = []
for i in range(2, round(math.sqrt(n)) + 1):
if (n%i) == 0:
res.append(i)
if i != n / i:
res.append(int(n / i))
return sorted(res)
n = 60
question8(n)
[2, 3, 4, 5, 6, 10, 12, 15, 20, 30]
n = 136
question8(n)
[2, 4, 8, 17, 34, 68]
n = 8075
question8(n)
[5, 17, 19, 25, 85, 95, 323, 425, 475, 1615]