5amia's blog

By 5amia, history, 3 years ago, In English

I tried to solve Round 340 — Problem A

same code gives WA in GNU C++17 Compiler but is accepted in both the c++14 and c++20(64) compilers.

AC Submission (c++20)

AC Submission (c++14)

WA Submission (c++17)

I expected ceil(5*0.2) to be 1, but it's giving 2. What's causing this?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it