Test cases failed in Inversion count

Sir, despite considering all the cases and having a correct sample case output, my code failed to pass all the test cases. Please point out the mistake in my code.

Link to my code : https://ide.codingblocks.com/s/603091

@Shamikh07 Try by taking long long datatype, logic seems correct

I tried by taking long long but it still failed

@Shamikh07 let me ask if there is any problem at the backend

It is still not working

@Shamikh07 please check out this code https://ide.codingblocks.com/s/603688

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.

yes mam, its clear now…Thank you so much