Please read the new rule regarding the restriction on the use of AI tools. ×

Doubt regarding sqrt function in C++ 17 and 23
Difference between en1 and en2, changed 12 character(s)
In the recent [contest:2020] contest, I submitted my solution for [problem:2020B] in C++ 23. There, I got the wrong answer on CG++ 23, but after the contest, I solved it by changing the language to CG++ 17, and it got accepted. So what was the problem?↵
Should I be using 
CG++ 17 or CG++ 23?↵
What should be considered when using the built-in sqrt() function? Like precision, etc..↵
CG++ 17 solution [submission:283662762]↵
CG++ 23 solution [submission:283597439]

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Dark_Knight_3 2024-09-29 22:02:59 2
en2 English Dark_Knight_3 2024-09-29 22:02:20 12 (published)
en1 English Dark_Knight_3 2024-09-29 22:01:18 503 Initial revision (saved to drafts)