fork download
  1. import math
  2. l = 0
  3. r = 10000000000000000000000000
  4. MAGIC = 1000;#Magic Do not Touch
  5.  
  6. while (r - l > 1) :
  7. m = (l + r) // 2
  8. a = 0
  9. for i in range(-MAGIC, 0) :
  10. k = i + m;
  11. if (k > 0 and math.sqrt(k * k) != k) :
  12. a = k
  13. break
  14. if (a > 0) :
  15. r = a
  16. if (a == 0) :
  17. l = m
  18. print (r)
Success #stdin #stdout 0.21s 10264KB
stdin
Standard input is empty
stdout
9007199254740993