JAVA NZEC

hey my program is giving me correct output on my netbeans IDE
but while i submit it on codechef then it gives NZEC error
please help me that what have did wrong in it
here is my code
http://www.codechef.com/viewsolution/4121985
and here is question

//