Giving me wrong ans on SPOJ

Link to code->https://ide.codingblocks.com/s/613906

@ikshuldureja130
your logic is correct but your code have 2 errors

  1. interger overflow so use long long everywhere or define int long long
  2. print “Case #i” for every test case
    Coding Blocks IDE
    this is the changed code it will work if your issue still exists let me know and if clear rate my experience

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

It worked!! Thank you
Can you please explain point 2, i.e. print “Case #i” for every test case