code:https://ide.codingblocks.com/s/246620
ques:https://online.codingblocks.com/app/player/74266/content/76599/5164/code-challenge
what am i doing wrong?
Count1 1 test case not passing
for the test case
1 0
0
answer should be
0
0
but your answer is
0
1
in line 27, your terminating condition in the for loop is incorrect, instead if <=, < would come
Corrected Code
thanks for clearing the doubt but what is wrong if i wrote >= in line 20 instead of >.
it is possible that in case of multiple answers we have to print the left most one, which problem setter might have forgotten to mention.