I have no idea whats wrong: CHFICRM problem

This is the problem: https://www.codechef.com/problems/CHFICRM
My code:https://www.codechef.com/viewsolution/34494488

I have no idea where my code fails, so any answers would be amazing. My code seems to be similar to other java codes successful submissions have; yet, mine still fails.

I’m pretty new to this stuff (time-on-site wise) so I still don’t really know how to find where my code fails. Any suggestions on how I can catch these errors by myself would be nice.

Initialize the f,t,ft within the while loop. You may declare them outside, but you must initialise them within the while loop.

1 Like