Capple december challenge

Hi All

I submitted solution for CAPPLE and its saying wrong answer.
I just wanted to know whether my understanding regarding question is correct or not.

According to my understanding of the question.

If set for apples on tree is given suppose
1 1 2 2 3 3 4 4 5 5 6 6
Then min time taken should be 6.

If set for apples on tree is given suppose
1 2 3 4 5 6 7 8 9 10
then answer should be 10.

Am i correct in my understanding or question is asking something else??

Please ignore this question.
Issue was at every output I had to put /n so that output is always in new line.

then close this question…