Sqrt function malfunctioning

Правка en2, от NeverMa573r, 2023-09-10 08:08:20

What is the difference between the prewritten sqrt function that I used here : https://mirror.codeforces.com/contest/1737/submission/222667221 and my own written sqrt function that I wrote here : https://mirror.codeforces.com/contest/1737/submission/222667916?

I understand stuff about precision and things like that, but I'm just rounding down, so even if something is like 2.0000067 it should still yield the correct answer. Please explain! I feel like this just happens over and over again: everytime I use sqrt(x) it always fails to get AC and I have to write my own sqrt function, even if my algo is correct.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский NeverMa573r 2023-09-10 08:08:20 0 (published)
en1 Английский NeverMa573r 2023-09-10 08:08:09 633 Initial revision (saved to drafts)