Though the code runs in hacker rank and in PC too but it didnt run in codechef IDE. I ran the accepted code by codechef for same problem that was also showing error.
ERROR IS NZEC.
Though i dont have intention to paste code here but i must because codechef ide not working well dont know why…
‘’’
import java.util.*;
public class Life
{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = 0 ;
while(a!=42){
a = scan.nextInt();
System.out.println(a);
}
}
}
‘’’