def Dichocube(k,p): a=0 b=10 while b-a>10**(-p): c=(a+b)/2 fc=c**3 if fc>k: b=c else: a=c return round(b,p)