Something i learned from today's contest

Revision en1, by 1guptagaurav, 2024-09-20 21:51:47

During today's Div2A contest, I encountered an issue with one of the questions. I wrote the expression ceil((n) / (c * 1.0)), which gave me a wrong answer on the second test case. This was really frustrating, and it ended up ruining my performance in the contest. After the system testing, I discovered the issue: the output format expected an integer, but I got something like "1e+009" instead. That’s when I realized I needed to cast the result to long long. Once I updated the code to (long long)(ceil((n) / (c * 1.0))) after the contest, it worked and got accepted.

During the contest, I was wasting time trying to find the problematic test case, when the real issue was my misunderstanding of the built-in functions. This experience taught me how important it is to fully understand the functions you're using. Today, I realized that participating in contests teaches you a lot, even if things don't go as planned.

[contest:2013][problem:2013A]

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English 1guptagaurav 2024-09-20 21:51:47 995 Initial revision (published)