A+B Problem
Problem retelling
Calculate a+b
Standard Input
Two integer a,b.
Standard Output
Output a+b
Samples
Input | Output |
---|---|
1 2 | 3 |
2 3 | 5 |
5 6 | 11 |
Constraints
0≤a,b≤10 |
---|
Time Limit : 1000 ms |
Memory Limit : 256 MiB |
Output Limit : 64 MiB |
Analysis
The given data range, create two integer variables, adding its output.
implemen
#include <iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
a=a+b;
cout<<a;
return 0;
}
summary
This is the first step. The beginning of this Problem,I want to use “Java” to achieve,but my Java learning has just started, although it is implemented locally, the website test cannot pass, so choose a more familiar language “CPP”.