Played around with programming in different languages over the years. Trying to unlearn old habits while keeping those worth keeping. Doing algorithms contests, bronze medal from IOI.
Played around with programming in different languages over the years. Trying to unlearn old habits while keeping those worth keeping. Doing algorithms contests, bronze medal from IOI.
Why is
27 40
not part of the solution 2?That's a very good question! I'll debug my program right after breakfast.
Ok, there is not an issue with the program, but the test input, rather. The first line says
20
, when there are 30 trips to read. Fixed.