WA in LEBOMBS

My program works well for almost every input but still it shows me “WA” can anyone help me?
The link to my code is
http://www.codechef.com/viewsolution/6683373

idk java but in c when i was comparing with ‘0’ and ‘1’ i had the same prob instead of that when i used their ascii value then i got correct ans…try that…might work for u as well