Life Universe and all SPOJ Java
I'm new to SPOJ and just getting started with the first problem, Life, Universe and all ... When I post I always see a compilation error. I don't see any error message when I click on the error link. I don't see any compilation error on my system. I see no errors in IDEONE. When I upload my solution, I see an empty java file.
What am I missing?
Here is an example link for my solution
Here is my code below in java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) {
try{
BufferedReader buf = new BufferedReader( new InputStreamReader( System.in ));
String line ;
while( (line = buf.readLine()) != null ){
if(!line.equals("42")){
System.out.println(line);
}else{
break;
}
}
}catch(IOException e){
System.out.println(e.toString());
}catch(Exception e){
System.out.println(e.toString());
}
}
}
+3
source to share
1 answer
SPOJ is not working at the moment, every user gets a compilation error for basic problems in the last 30 minutes. See: http://www.spoj.com/status/
+2
source to share