Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Life Universe and everything SPOJ Java

Tags:

java

I am new to SPOJ and just started off with the first problem, Life, the Universe and Everything I always see a compilation error when I submit. I do not see any error message when I click the error link. I could not see any compilation error on my system. I cannot see any error in IDEONE. When I download my solution I see a blank java file.

What am I missing ?

Here is sample error link for my solution

Error link

Here is my below code 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());
        }

    }

}
like image 639
sreeprasad Avatar asked Dec 19 '25 20:12

sreeprasad


1 Answers

SPOJ is down at the moment, every single user is getting compilation error for the simplest of the problems, from past 30 minutes. See: http://www.spoj.com/status/

like image 118
hemant6488 Avatar answered Dec 21 '25 10:12

hemant6488



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!