Birthday Candles.. wrong answer.. pleeaz help!

I’m getting W.A. plz! do tell me where I’m wrong…
problem link: http://www.codechef.com/problems/CANDLE
solution: http://www.codechef.com/viewsolution/4855615

Hi! I won’t tell you whats actually wrong with your solution. Here’s a test case that fails your solution:

Input:

1

1 2 3 4 5 6 7 8 1 2

Expected Output: 88

Your Output: 00

Hint: First, try out the test case manually and see how you will approach it. Next, dry run your code with the given input.

2 Likes

Thanks for that test case.
I’ve remove that bug but again getting W.A.What to do…
Problem link: http://www.codechef.com/viewsolution/4928485