Showing output differently on submit and on when run

image
It is showing diffebrent output for same code, when i am trying to run the code in the given compiler and when i am trying to submit the code. As per my code the answer should be 4 for the given testcase but during submission it is showing output as 10 for that particular testcase...

Can anyone help???
thanks in advance...

Comments (1)