NZEC error in java

Hello Guys This Program Is Working correctly on my system but giving nzec on codechef please tell me why is this so

My Problem Link Is -This

N can be equal to 0.Your code goes in an infinite loop in that case.

1 Like

thank’s for your help

//