Please check code (1 test case passed)

why is only 1 test case passed

instead of int use long long int

also use braces

you can refer this code

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