Why this method works slowly. Is there any fastest way of finding length of divisors
CodePudding user response:
well range
function always accepts int as its arguments, but the division inside range
function always outputs a float.
Try this:
math.ceil(float_number)
because as you range
function does not cover the upper-range number.
Moreover, you have to include number 1 in your range
function as well; that is, change your range
function to this:
range(1, n 1)