Help in Codeforces problem a

/* package codechef; // don’t place package name! */

import java.util.;
import java.lang.

/* 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(;
int a=s.nextInt();

What,s wrong with this program

Please either format your code or link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

Also - can you provide a link to the Problem? “Codeforces problem a” is hard to Google :slight_smile:


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))

1 Like
My Solution using your code…
you just forgot the output that’s all! :slight_smile:
(sorry for the delay it was stuck in submission queue)

1 Like