What is the error in this no test case is passing and pls tell how to put A[i] condition in our code

I am debugging the code please wait

there is update of how the o/p is being shown
and the datatype

refer the below code