COOK98B -ATM2 WA

In this question https://www.codechef.com/COOK98B/problems/ATM2
My solution was https://www.codechef.com/viewsolution/20299027
This and I also got correct response through my compiler but codechef deemed it to be incorrect . What is my mistake

Initialise c=0 inside the while loop at the start.

//