/* Name of the class has to be “Main” only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner s=new Scanner(System.in);
while(true)
{
int a=s.nextInt();
if(a==42)
{
break;
}
}
}
}
That is true. But this solution looks closely like that Life,Universe and Everything question from Codechef…
going by that logic you have to do at 17 (after if(a==42))