Counting in Byte Land WA

Am getting WA, whats the error in this code?

Please someone help

@rasokan
Please send your code on another IDE.
CB IDE is under maintenance today.
This is a fenwick tree ques https://www.hackerearth.com/practice/data-structures/advanced-data-structures/fenwick-binary-indexed-trees/practice-problems/algorithm/counting-in-byteland/editorial/

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.