I am getting wrong answers on two test cases

my code

use long long int instead of int
as output will be large so may overflow int

i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning:
if you have more doubts regarding this feel free to ask