3
我是新來的SPOJ,剛開始的第一個問題,Life, the Universe and Everything 我提交時總是看到編譯錯誤。點擊錯誤鏈接時,我看不到任何錯誤消息。我在我的系統上看不到任何編譯錯誤。我在IDEONE中看不到任何錯誤。當我下載我的解決方案時,我看到一個空白的java文件。生命宇宙和一切SPOJ 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());
}
}
}
這個編譯正常(請參閱http://ideone.com/EoEGcN)。也許你沒有選擇正確的語言SPOJ – 2014-10-19 12:55:38
我在提交之前選擇了java se6作爲語言。不過,網站現在似乎已經停擺。即使狀態鏈接顯示錯誤頁面。 – sreeprasad 2014-10-19 18:18:47