我是 SPOJ 的新手,刚开始遇到第一个问题,Life, the Universe and Everything 我提交的时候总是看到编译错误。单击错误链接时,我没有看到任何错误消息。我在我的系统上看不到任何编译错误。我在 IDEONE 中看不到任何错误。当我下载我的解决方案时,我看到一个空白的 java 文件。
我错过了什么?
这是我的解决方案的示例错误链接
下面是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());
}
}
}
最佳答案
SPOJ 目前已关闭,过去 30 分钟以来,每个用户都遇到最简单问题的编译错误。 看: http://www.spoj.com/status/
关于java - 生命宇宙和一切 SPOJ Java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26450534/