The online judge system is running on Debian Linux. We are using GNU GCC/G++ for C/C++ compile, Free Pascal for pascal compile and sun-java-jdk1.6 for Java. The compile options are:
C: | gcc Main.c -o Main -ansi -fno-asm -O2 -Wall -lm --static |
C++: | g++ Main.c -o Main -ansi -fno-asm -O2 -Wall -lm --static |
Pascal: | fpc -Co -Cr -Ct -Ci |
Java: | javac Main.java |
Our compiler software version:
Your program shall read input from stdin('Standard Input') and write output to stdout('Standard
Output').For example,you can use 'scanf' in C or 'cin' in C++ to read from stdin,and use 'printf' in C
or 'cout' in C++ to write to stdout.
User programs are not allowed to open and read from/write to
files, you will get a "Runtime Error" if you try to do so.
#include <iostream> using namespace std; int main(){ int a,b; cin >> a >> b; cout << a+b; return 0; }
#include <stdio.h> int main(){ int a,b; scanf("%d %d",&a, &b); printf("%d",a+b); return 0; }
program p1001(Input,Output); var a,b:Integer; begin begin Readln(a,b); Write(a+b); end; end.
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner cin = new Scanner(System.in); int a, b; a = cin.nextInt(); b = cin.nextInt(); System.out.println(a + b); } }
There are some differences between GNU and MS-VC++, such as:
Here is a list of the judge's replies and their meaning:
Can you submit programs for any practice problems on this Online Judge? If you can, then that is the account you use in an online contest. If you can't, then please register an id with password first.