how can it happen that subtask with 10^9 is passed but 10^5 is not

In chef and interview question, I am getting Wrong Answer for subtask N<10^5 but there is no problem with subtask N<10^9…\

How is this possible???

Hi @rayobanon

Sub-tasks may only check certain test cases for any problem, it need not encompass all the corner cases. It might be possible that your solution handles all the test cases for the sub-task with larger input but fails in case of a corner test case for a smaller input.

So, you get full points only when you have completed all sub-tasks, i.e, handled all corner cases for all input sizes.

I hope it helps. Happy Coding! :smiley: