What is wrong in my solution

My proposed solution for the AMMEAT problem is giving WRONG ANSWER on submission. Fail to understand why?

Any Hint …

Unfortunately, the Formatting over here was messing up had to create PASTE BIN link https://pastebin.com/HqX8KiZi.

Try using long long or long long int instead of long int. Not sure, but I think long int’s range is same as int (not sure but intuition says so).

for some reason can’t see your solution. Can you please copy paste the code here?

@kunnu120 just added the pastebin link.

@vijju123 Yes. :slight_smile: