Test cases that are not passed

please tell me the test cases that are not passed, and logic is correct or not

hey @1999atrijsharma
Try for this input :
10
6
7
8
9
0
1
2
3
4
5
0
correct output : 4