Hangzhou Electric A+b Classification

Source: Internet
Author: User

Free to do nothing, did hang electric a+b topic:

1000:

Problem Description Calculate A + B. Input each line would contain two integers a and b. Process to end of file. Output for each case, output A + B at one line. Sample Input

1 1 Sample Output
2 #include <iostream> using namespace std;     int main () {int a,b,sum;         while (cin>>a>>b) {sum=0;         Sum=a+b;     cout<<sum<<endl; return 0; } 1002:

Problem Description I have a very simple Problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.
Input the ' the ' input contains an integer T (1<=t<=20) which means the number of test cases. Then T lines follow, each line consists of two positive, A and B. integers that Notice integers are very, that M EANs you should the not process them by using 32-bit integer. You could assume the length of each integer would not exceed 1000.
Output for each test case, you should output two lines. The the "the" "Case #:", # means the ' the ' test case. The second line is the ' an equation ' a + b = Sum ', sum means the result of a + B. Note There are some spaces int the Equati On. Output a blank line between two test cases.
Sample Input

2 1 2 112233445566778899 998877665544332211 Sample Output
1:1 + 2 = 3 Case 2:1.,122,334,455,667,79e,+17 + 998877665544332211 = 1111111111111111110//////////////////Sorry, it's not written.

1089:

Problem Description Your task is to Calculate A + B.
Too easy?! of course! I specially designed the problem for ACM beginners.
You are must have found that some problems have the same titles and this one, yes, all these problems were designed for the s Ame aim.
Input the input would consist of a series of pairs of integers a and b, separated by a spaces, one pair of integers per line .
Output for each pair of input integers a and b you should output the sum of a and B in one line, and with one line of OUTP UT for each line in input.
Sample Input

1 5 10 20
Sample Output
6 #include <iostream> using namespace std;     int main () {int a,b,sum;         while (cin>>a>>b) {sum=0;         Sum=a+b;     cout<<sum<<endl; return 0; }

1090:

Problem Description Your task is to Calculate A + B.
Input input contains an integer n in the The "the", and then n lines follow. Each line consists of the a pair of integers a and b, separated by a space, one pair of integers per line.
Output for each pair of input integers a and b you should output the sum of a and B in one line, and with one line of OUTP UT for each line in input.
Sample Input

2 1 5 10 20
Sample Output
6 #include <iostream> using namespace std;     int main () {int n;     int a,b,sum;     cin>>n;         while (n--) {sum=0;         cin>>a>>b;         Sum=a+b;     cout<<sum<<endl; return 0; }

1091:

Problem Description Your task is to Calculate A + B. Input input contains multiple test cases. Each test case contains a pair of integers a and B, one pair of integers per line. A test case containing 0 0 terminates the "input and this" test case are not. Processed.
Output for each pair of input integers a and b you should output the sum of a and B in one line, and with one line of OUTP UT for each line in input.

Sample Input

1 5 10 20 0 0
Sample Output
6 #include <iostream> using namespace std;     int main () {int a,b,sum;         while (cin>>a>>b) {if (a==0&&b==0) {break;             else {sum=0;             Sum=a+b;         cout<<sum<<endl; } return 0; }

1092:


Problem Description Your Task is to Calculate the sum of some integers.

Input input contains multiple test cases. Each test case contains an integer n, and then n integers follow in the same line. A test case starting with 0 terminates the "input" and "This" test case are not. Processed.

Output for each group of input integers your should output their sum in one line In input.
Sample Input

4 1 2 3 4 5 1 2 3 4 5-0
Sample Output
#include <iostream> using namespace std;     int main () {int n;     int sum;         while (cin>>n) {if (n==0) {break;             else {int arr[100];             sum=0;             for (int i=0;i<n;i++) cin>>arr[i];             for (int i=0;i<n;i++) {sum+=arr[i];         } cout<<sum<<endl; } return 0; }

1093:


Problem Description Your task is to calculate the sum of some integers.

Input input contains an integer n in the The "the", and then n lines follow. Each line starts with an integer m, and then m integers follow in the same line.

Output for each group of input integers your should output their sum in one line In input.

Sample Input

2 4 1 2 3 4 5 1 2 3 4-5
Sample Output
#include <iostream> using namespace std;     int main () {int n;     cin>>n;     int sum,num;         while (n--) {sum=0;         int i;         cin>>i;             for (int j=1;j<=i;j++) {cin>>num;         Sum+=num;     } cout<<sum<<endl; return 0; }

1094:

Problem Description Your task is to calculate the sum of some integers.

Input input contains multiple test cases, and one case one. Each case is starts with a integer n, and then n integers follow in the same line.

Output for each test case you should output the sum of "N integers in one", and with one line of output for each line I N input.

Sample Input

4 1 2 3 4 5 1 2 3 4 5
Sample Output
#include <iostream> using namespace std;     int main () {int sum,num,i;         while (Cin>>num) {sum=0;         int s;             for (int j=1;j<=num;j++) {cin>>s;         Sum+=s;     } cout<<sum<<endl; return 0; } 1095:

Problem Description Your task is to Calculate A + B.

Input the input would consist of a series of pairs of integers a and b, separated by a spaces, one pair of integers per line .

Output for each pair of input integers A and B are should output the sum of A and B, and followed by a blank line.

Sample Input

1 5 10 20
Sample Output
6 #include <iostream> using namespace std;     int main () {int a,b,sum;         while (cin>>a>>b) {sum=a+b;         cout<<sum<<endl;     cout<<endl; return 0; } 1096:

Problem Description Your task is to calculate the sum of some integers.

Input input contains an integer n in the The "the", and then n lines follow. Each line starts with an integer m, and then m integers follow in the same line.

Output for each group of input integers your should output their sum in one line, and your must note this there is a blank l ine between outputs.

Sample Input

3 4 1 2 3 4 5 1 2 3 4 5 3 1-2 3
Sample Output
6 #include <iostream> using namespace std;     int main () {int n;     int sum;     cin>>n;         while (n--) {sum=0;         int m;         cin>>m;         int num;             while (m--) {cin>>num;         Sum+=num;         } cout<<sum<<endl;             if (n!=0) cout<<endl; return 0; }


1228:

Problem Description reads two positive integers a and B that are less than 100, and calculates a+b.
Notice that each digit of A and b is given by the corresponding English word.

Input test entry contains a number of test cases, one row for each test case, the format is "a + b =", and the adjacent two strings have a space interval. When a and B enter at the same time as the end of the 0 o'clock, the corresponding results are not output.

Output outputs 1 rows for each test case, that is, the a+b value.

Sample Input

One + two = Three four + five six = zero Seven + eight nine = zero + zero =
Sample Output
3 90 96

Not now.


1229:

Problem Description reads two positive integers a and B that are less than 10000, and calculates a+b. Note that if the end K (no more than 8) digits of A and B are the same, direct output-1.
Input test entry contains several test cases, one row for each test case, and the format "a B K" with a space interval between the two adjacent digits. When A and B are entered at the same time for 0 o'clock, the corresponding results are not output.

Output outputs 1 rows for each test case, that is, the value of a+b or 1.

Sample Input

1 2 1 11, 21 1 108 8 2 36 64 3 0 0 1
Sample Output
3-1-1 100

Not now.

1230:


Problem Description reads two mars positive integers a and B, not exceeding 25 bits, to compute the a+b. It should be noted that on Mars, the integer is not a single system, the nth bit of the system is the nth prime number. For example: 10 of the Earth's number of 2, on Mars recorded as "1,0", because the Mars single digit is 2; 10 of the Earth's number 38, on Mars, recorded as "1,1,1,0", because the Mars Single-digit is 2, 10 digits is 3, the Hundred is 5, the thousand is 7 into the system ....

Input test entry contains a number of test cases, one row for each test case, contains two Mars positive integers a and B, and the adjacent two digits of the Mars integer are separated by commas, with a space interval between a and B. When a or B enters the end of 0 o'clock, the corresponding result is not output.
Output 1 rows For each test case, that is, the a+b value of the Mars notation.
Sample Input

1,0 2,1 4,2,0 1,2,0 1 10,6,4,2,1 0 0
Sample Output
1,0,1 1,1,1,0 1,0,0,0,0,0

Not now.

1412:

Problem Description reads two mars positive integers a and B, not exceeding 25 bits, to compute the a+b. It should be noted that on Mars, the integer is not a single system, the nth bit of the system is the nth prime number. For example: 10 of the Earth's number of 2, on Mars recorded as "1,0", because the Mars single digit is 2; 10 of the Earth's number 38, on Mars, recorded as "1,1,1,0", because the Mars Single-digit is 2, 10 digits is 3, the Hundred is 5, the thousand is 7 into the system ....

Input test entry contains a number of test cases, one row for each test case, contains two Mars positive integers a and B, and the adjacent two digits of the Mars integer are separated by commas, with a space interval between a and B. When a or B enters the end of 0 o'clock, the corresponding result is not output.

Output 1 rows For each test case, that is, the a+b value of the Mars notation.
Sample Input

1,0 2,1 4,2,0 1,2,0 1 10,6,4,2,1 0 0
Sample Output
1,0,1 1,1,1,0 1,0,0,0,0,0

Not now.


1720:

Problem Description Many Classmates said to me this a+b is must needs.
If you can ' t AC this problem, your would invite me for night meal. ^_^

Input input may contain multiple test cases. Each case contains A and B into one line.
A, B are hexadecimal number.
Input terminates by EOF.
Output output a+b in decimal number into one line. Sample Input

1 9 A B a B Sample Output
10 21 21//Not Now


1753:

Problem Description said, after a long one months, Xiaoming has grown a lot, so he changed a name "Daming".
He was not the "xiaoming" who would only do the addition of 100 or more, and now he would even add a decimal of any length.

Now, to give you two positive decimal A and B, your task is to calculate the value of A+b on behalf of Daming.
Input This topic contains many sets of test data, please handle to file end.
Each set of test data contains two positive decimals, A and B, with a length of no greater than 400, in one row.
Output output a+b in a line, please output the simplest form. Please see sample Output for detailed requirements.
Sample Input

1.1 2.9 1.1111111111 2.3444323343 1 1.1
Sample Output
4 3.4555434454 2.1//To Be continued


1866:

Problem Description as always, A + B is the necessary Problem to this warming-up contest. But the patterns and contents are different from the previous ones. Now I come up and a new "A + B" problem for you, the top coders of HDU.
As we say, the addition defined between two rectangles is the sum of their area. And you just have to tell me the ultimate area if there are a few.
Isn ' t it a piece of cake for you? Come on! Capture the bright "accepted" for yourself.
Input There come a lot of cases. In each case, the there is only a string at one line. There are four integers, such as "(X1,y1,x2,y2)", describing the coordinates of the rectangle, with two brackets Shing other rectangle (s) from the string. There lies a plus symbol between every two rectangles. Blanks separating the integers and the interpunctions are added into the strings. The length of the string doesn ' t exceed 500.
0<=x1,x2<=1000,0<=y1,y2<=1000.
Output for each case, you just need to print the "a+b" problem.   The results would not exceed the limit of the 32-signed integer. Sample Input

(1,1,2,2) + (3,3,4,4) (1,1,3,3) + (2,2,4,4) + (5,5,6,6) Sample Output
2 8 to be continued .....

1867:

Problem Description Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you have two strings, such as "asdf" and "SDFG", the result of the addition between them be "ASDFG" for ' SDF ' is th

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.