def balayage(n): a=1 for i in range(1,n+1): p=10**-i while a**3-a-2<0: a=a+p a=a-p return(a,a+p)