ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1000. A+B Problem

I do not know why I am wrong, Netbeans works OK, but can not be accepted
Posted by Hufeng Zhou 8 May 2010 22:12
I do not know why I am wrong, Netbeans works OK, but can not be accepted, below is my code.

public class Main {

    public static void main(String[] args) {
        System.out.println("Addition of Two Numbers(a,b) the sum is c");
        int a = Integer.parseInt(args[0]);
        int b = Integer.parseInt(args[1]);
        int c = a+b;
        System.out.println( "c="+c );
    }

}
Re: I do not know why I am wrong, Netbeans works OK, but can not be accepted
Posted by Oleg Strekalovsky [Vologda SPU] 9 May 2010 03:41
Hufeng Zhou wrote 8 May 2010 22:12
I do not know why I am wrong, Netbeans works OK, but can not be accepted, below is my code.

public class Main {

    public static void main(String[] args) {
        System.out.println("Addition of Two Numbers(a,b) the sum is c");  // remove line
        int a = Integer.parseInt(args[0]);// use Scanner() to read numbers. Not console arguments.
        int b = Integer.parseInt(args[1]);
        int c = a+b;
        System.out.println( "c="+c );// your output must mutch with example's output. Just "System.out.println( c );
    }

}
Re: I do not know why I am wrong, Netbeans works OK, but can not be accepted
Posted by Hufeng Zhou 9 May 2010 07:08
Dear  Oleg Strekalovsky:
Thank you so much for your help!
Re: I do not know why I am wrong, Netbeans works OK, but can not be accepted
Posted by Hufeng Zhou 9 May 2010 08:08
Dear Oleg Strekalovsky:
Due to your great help, my submission has finally been accepted.
Thank you so much!
Re: I do not know why I am wrong, Netbeans works OK, but can not be accepted
Posted by SuperLight 9 May 2010 10:13