my 2nd test case failed to pass ,please see my code
Https://ide.codingblocks.com/s/308925
use long long int instead of int
all testcase will passed
Modified Code
if you want to ask something about this feel free to ask
i hope this helps
if yes show your response with
and don’t forgot to mark doubt as resolved