Getting wrong ans on 2 test cases

My logic is same as explained in the video. I am only getting partial score.

@avinash.ee61 use long long int in place of int. It will pass

Also remember to mark the doubt as resolved after solving this.