NZEC ERROR IN JAVA PROGRAM...PLZZ HELP

Recently I took up a problem to solve using java but it showed NZEC error on submission. Problem can be viewed here::

My solution is here. Plz take a look at it and suggest the reasons due to which I get NZEC.

http://www.codechef.com/viewsolution/2568375

while u do parseInt()…it is mostly throwing a NumberFormatException…as the value is too large for an int in java…hence the NZEC!!!

see this code…LINK!!!

1 Like

Probably not a reason, but B is not int.

1 Like

what do u mean to say betlista??

he means to say that u cannot store such large values(upto 10 ^ 12) in int…!!!

1 Like

@betlista… Turns out, it indeed IS the reason.

You are correct, my first (#2) try got TLE http://ideone.com/ciwlxU

1 Like

thanks kunal361…NZEC removed…but this time its TLE…help plz…