def f(x):
return 2 * x ** 3 - x - 5
def miejsce_zerowe(eps):
a = 0
b = 100
while abs(b - a) > eps:
c = (a + b) / 2
if f(c) > 0:
b = c
else:
a = c
return c
# your code goes here
ZGVmIGYoeCk6CglyZXR1cm4gMiAqIHggKiogMyAtIHggLSA1CgkKZGVmIG1pZWpzY2VfemVyb3dlKGVwcyk6CglhID0gMAoJYiA9IDEwMAoJd2hpbGUgYWJzKGIgLSBhKSA+IGVwczoKCQljID0gKGEgKyBiKSAvIDIKCQlpZiBmKGMpID4gMDoKCQkJYiA9IGMKCQllbHNlOgoJCQlhID0gYwoJcmV0dXJuIGMKCgkjIHlvdXIgY29kZSBnb2VzIGhlcmU=