Test Case #3 - Wrong Answer

I am getting wrong answer for test case 3 but I think I have written the correct code and have taken into account large inputs, so please could you check my code and tell if there is something wrong.

link - https://ide.codingblocks.com/s/69158

@kumar.chaitanya1997 hey your code is not working for this set of test case
1
1
1
1
your output is 0,2,END
but it should be 2,END

Oh! I checked it for many combinations of 9’s but forgot the simplest of all.
Thanks btw.

@kumar.chaitanya1997 keep it up happy coding!

Hey Chaitanya,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.