Please rectify my errors in this java code

QUESTION=[1]: http://www.codechef.com/problems/COMM3

MY SOLUTION=[2]:http://www.codechef.com/viewsolution/6780677
TYPE OF ERROR= COMPILATION ERROR
PLEASE RECTIFY MY CODE AND MAKE ME UNDERSTAND MY ERRORS(me,a absolute beginner).

Remove public from your class name. It should be class comm3 Not public class comm3

now showing Runtime Error(NZEC).

Well you asked the reason for Compile Time Error, NZEC means issue in your code, so just check your code.