Doubt regarding sqrt function in C++ 17 and 23

Правка en1, от Dark_Knight_3, 2024-09-29 22:01:18

In the recent Codeforces Round 976 (Div. 2) and Divide By Zero 9.0 contest, I submitted my solution for 2020B - Brightness Begins in C++ 23. There, I got the wrong answer on C++ 23, but after the contest, I solved it by changing the language to C++ 17, and it got accepted. So what was the problem? Should I be using C++ 17 or C++ 23? What should be considered when using the built-in sqrt() function? Like precision, etc.. C++ 17 solution 283662762 C++ 23 solution 283597439

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Dark_Knight_3 2024-09-29 22:02:59 2
en2 Английский Dark_Knight_3 2024-09-29 22:02:20 12 (published)
en1 Английский Dark_Knight_3 2024-09-29 22:01:18 503 Initial revision (saved to drafts)