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, 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 );
    }

}
Oleg Strekalovsky [Vologda SPU] Re: I do not know why I am wrong, Netbeans works OK, but can not be accepted [2] // Problem 1000. A+B Problem 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 );
    }

}
Dear  Oleg Strekalovsky:
Thank you so much for your help!
Dear Oleg Strekalovsky:
Due to your great help, my submission has finally been accepted.
Thank you so much!