imtiaj.zero's blog

By imtiaj.zero, history, 20 months ago, In English

When I submitted the following code in GNU C++20 (64) I got wrong on test 2, whereas in GNU C++17 it got Accepted. Would anyone please tell the reason behind this. Thanks in advance.

Problem Link:

1809B - Points on Plane

My submission link: 

198895642 in GNU C++20 (64) lang.

198895850 in GNU C++17 lang.

  • Vote: I like it
  • +6
  • Vote: I do not like it

| Write comment?
»
20 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Use sqrtl(n)

Test: n = 626220435839628002

sqrt(n) = 791340910.00000000000000000000

sqrtl(n) = 791340909.99999993806704878807