Problems
Contests
Events
Topic
IDE
PacketHub
Login
Description
Editorial
My Submission
1000.A+B Problem
Look up all submission
Status
Time
Memory
Lang.
Submit Date
1000.A+B Problem
Time Limit:1000MS Memory Limit:655350KB
Description
Calculate A + B,and give me the answer!
Input
Input two integers A and B.(Watch the Sample Input)
Output
For each case, output A + B in one line..(Watch the Sample Output)
Sample test
Sample input
1 2
Sample output
3
Note
Press the **Submit** to submit your code! Q: Where is the input and the output? A: 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 "Restricted Function" if you try to do so. Here is a sample solution for problem 1000 using C: ``` #include
int main(void) { int a,b; while(scanf("%d%d", &a,&b) != EOF) printf("%d\n",a+b); return 0; } ``` Here is a sample solution for problem 1000 using C++: ``` #include
using namespace std; int main(void) { int a,b; while(cin >> a>>b) cout << a+b<
Tags
implementation
Post editorial
Editorials
GNU C++ 9.3.0
GNU C 9.3.0
Java 1.8
Python 3.8.4
Lua 5.3
GO 1.12.4
JS - (nodejs 10.19.0)
Login before submit
Test Input
Test Output
1 2
Please run you code firstly.
Console
IDE Setting
字体设置
调整适合你的字体大小。
12px
13px
14px
15px
16px
18px
20px
主题设置
切换不同的代码编辑器主题,选择适合你的语法高亮。
Visual Studio
Visual Studio Dark
High Contrast Dark
行宽限制
设置每一行代码的最大字符个数,设置为0则不限制。
0
80
100
120