Only the last test fails.

The question is whether the sample test output wrong or the solution
produces the wrong answer, which one is true, difficult to say now,
considering that the solution produced the correct answer for all other
tests.