fork download
  1. def icroot(a):
  2. c = a
  3. b = 2*c//3+a//(3*c*c)
  4. while (abs(b-c) >= 1) :
  5. c = b
  6. b = 2*c//3+a//(3*c*c)
  7. return b
  8.  
  9. x =int(input())
  10. y = icroot(x)
  11.  
  12. print(y)
  13.  
  14.  
Success #stdin #stdout 0.03s 9820KB
stdin
5
stdout
1