{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eCalculate a + b\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Two integer a,,b (0 ≤ a,b ≤ 10)"}},{"title":"Output","value":{"format":"HTML","content":"Output a + b"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1 2\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"Q: Where are the input and the output?\u003cbr\u003e\u003cbr\u003eA: Your program shall always \u003cfont color\u003d\"red\"\u003eread input from stdin (Standard Input) and write output to stdout (Standard Output)\u003c/font\u003e. For example, you can use \u0027scanf\u0027 in C or \u0027cin\u0027 in C++ to read from stdin, and use \u0027printf\u0027 in C or \u0027cout\u0027 in C++ to write to stdout.\u003cbr\u003e\u003cbr\u003eYou \u003cfont color\u003d\"red\"\u003eshall not output any extra data\u003c/font\u003e to standard output other than that required by the problem, otherwise you will get a \"Wrong Answer\".\u003cbr\u003e\u003cbr\u003eUser programs are not allowed to open and read from/write to files. You will get a \"Runtime Error\" or a \"Wrong Answer\" if you try to do so. \u003cbr\u003e\u003cbr\u003eHere is a sample solution for problem 1000 using C++/G++:\u003cbr\u003e\u003cpre\u003e\u003cbr\u003e#include \u0026lt;iostream\u0026gt;\u003cbr\u003eusing namespace std;\u003cbr\u003eint main()\u003cbr\u003e{\u003cbr\u003e int a,b;\u003cbr\u003e cin \u0026gt;\u0026gt; a \u0026gt;\u0026gt; b;\u003cbr\u003e cout \u0026lt;\u0026lt; a+b \u0026lt;\u0026lt; endl;\u003cbr\u003e return 0;\u003cbr\u003e}\u003c/pre\u003e\u003cbr\u003eIt\u0027s important that the return type of main() must be int when you use G++/GCC,or you may get compile error.\u003cbr\u003e\u003cbr\u003eHere is a sample solution for problem 1000 using C/GCC:\u003cbr\u003e\u003cpre\u003e\u003cbr\u003e#include \u0026lt;stdio.h\u0026gt;\u003cbr\u003e\u003cbr\u003eint main()\u003cbr\u003e{\u003cbr\u003e int a,b;\u003cbr\u003e scanf(\"%d %d\",\u0026amp;a, \u0026amp;b);\u003cbr\u003e printf(\"%d\\n\",a+b);\u003cbr\u003e return 0;\u003cbr\u003e}\u003c/pre\u003e\u003cbr\u003eHere is a sample solution for problem 1000 using PASCAL:\u003cbr\u003e\u003cpre\u003e\u003cbr\u003eprogram p1000(Input,Output); \u003cbr\u003evar \u003cbr\u003e a,b:Integer; \u003cbr\u003ebegin \u003cbr\u003e Readln(a,b); \u003cbr\u003e Writeln(a+b); \u003cbr\u003eend.\u003c/pre\u003e\u003cbr\u003eHere is a sample solution for problem 1000 using JAVA:\u003cbr\u003e\u003cbr\u003eNow java compiler is jdk 1.5, next is program for 1000\u003cbr\u003e\u003cpre\u003e\u003cbr\u003eimport java.io.*;\u003cbr\u003eimport java.util.*;\u003cbr\u003epublic class Main\u003cbr\u003e{\u003cbr\u003e public static void main(String args[]) throws Exception\u003cbr\u003e {\u003cbr\u003e Scanner cin\u003dnew Scanner(System.in);\u003cbr\u003e int a\u003dcin.nextInt(),b\u003dcin.nextInt();\u003cbr\u003e System.out.println(a+b);\u003cbr\u003e }\u003cbr\u003e}\u003c/pre\u003e\u003cbr\u003eOld program for jdk 1.4\u003cbr\u003e\u003cpre\u003e\u003cbr\u003eimport java.io.*;\u003cbr\u003eimport java.util.*;\u003cbr\u003e\u003cbr\u003epublic class Main\u003cbr\u003e{\u003cbr\u003e public static void main (String args[]) throws Exception\u003cbr\u003e {\u003cbr\u003e BufferedReader stdin \u003d \u003cbr\u003e new BufferedReader(\u003cbr\u003e new InputStreamReader(System.in));\u003cbr\u003e\u003cbr\u003e String line \u003d stdin.readLine();\u003cbr\u003e StringTokenizer st \u003d new StringTokenizer(line);\u003cbr\u003e int a \u003d Integer.parseInt(st.nextToken());\u003cbr\u003e int b \u003d Integer.parseInt(st.nextToken());\u003cbr\u003e System.out.println(a+b);\u003cbr\u003e }\u003cbr\u003e}\u003c/pre\u003e"}}]}