compile time error in java program

i am new to this forum getting compile time error when submitting my program in java while its running fine on my system
the error is following error: class CodeChefAugChallange is public, should be declared in a file named public class CodeChefAugChallange ^ 1 error

please help me in getting rid of this problem

name ur class public Main…hope this will help…:slight_smile:

thanks kunal that trick worked but now i am getting runtime error for the same program while its running fine on my system
the error is following
Runtime Error(NZEC)

could you please help me in this matter
thanks in advance

RE is maybe being caused due to faulty access of mem or maybe too much mem being allocated or ne such reason…but this is related to ur algo…which u can only discuss abt after the end on the contest…so pls post the link of ur code after the contest on the editorial or maybe this ques…and u will surely get a ans…:slight_smile:

@abhinitp : see the samples for various languages to know how to write codes here on codechef.

if your class is public, then class name must always be ‘Main’ (without the quotes). alternatively you can give class your personalized name by not specifying it public.