Getting wa

https://codeforces.com/contest/702/problem/A

https://codeforces.com/contest/702/submission/82359922

getting WA on 10 th test case but giving right output in my ide

You access the array out of bounds

thanks it worked i forget to notice