HOLI - SPOJ gives WA for seemingly correct answer

I wrote a solution for the HOLI spoj problem after referring the video lecture. Still the verdict is WA for a seemingly correct code. Please help me out.

The link to my code is:

holi cpp

The problem can also be found at spoj:
spoj Holi

Hi

Check carefully what you have to give output, your logic and code is correct you have to print output like this:
Case #1: ans

1 Like

Thanks for pointing out the silly mistake. I was going mad over this.

Hahahahah My pleasure!

1 Like