1003: A+B for Input-Output Practice (III)
技術標籤:WUSTOJ
Description
計算 a + b.
Input
多組測試資料,每組測試資料佔一行,包括2個整數,如果2個整數都為0,則表示測試結束。
Output
每組測試資料佔一行,輸出兩個整數的和。
Sample Input
1 5
10 20
0 0
Sample Output
6
30
Code
#include<iostream> using namespace std; int main() { int a,b; while(cin>>a>>b) { if(a!=0&&b!=0) cout<<a+b<<endl; else return 0; } }
相關推薦
1003: A+B for Input-Output Practice (III)
技術標籤:WUSTOJ Description 計算 a + b. Input 多組測試資料,每組測試資料佔一行,包括2個整數,如果2個整數都為0,則表示測試結束。
1008: A+B for Input-Output Practice (VIII)
技術標籤:WUSTOJ Description Your task is to calculate the sum of some integers. Input Input contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, a
1007: A+B for Input-Output Practice (VII)
技術標籤:WUSTOJ Description Your task is to Calculate a + b. Input The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
1006: A+B for Input-Output Practice (VI)
技術標籤:WUSTOJ Description Your task is to calculate the sum of some integers. Input Input contains multiple test cases, and one case one line. Each case starts with an integer N, and then N in
1004: A+B for Input-Output Practice (IV)
技術標籤:WUSTOJ Description Your task is to Calculate the sum of some integers. Input Input contains multiple test cases. Each test case contains a integer N, and then N integers follow in the s
1002: A+B for Input-Output Practice (II)
技術標籤:WUSTOJ Description 計算 a + b. Input 多組測試資料。 第一行給出整數n,表示共有n組測試資料。
PAT (Advanced Level) Practice 1002 A+B for Polynomials (25分)
題目描述:https://pintia.cn/problem-sets/994805342720868352/problems/994805526272000000 題目大意:給出兩個多項式,輸出多項式和。
PAT (Advanced Level) Practice : 1002 A+B for Polynomials (25分)
1002 A+B for Polynomials (25分) 測試點2和測試點6的坑 測試點2:係數結果可能是負數
PAT甲級1002 A+B for Polynomials (25分)附測試點6段錯誤原因
This time, you are supposed to findA+BwhereAandBare two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the information o
PAT1002 A+B for Polynomials
題目描述 1002 A+B for Polynomials (25分) This time, you are supposed to find A+B where A and B are two polynomials.
PAT 1002 A+B for Polynomials Go語言題解及注意事項
1002A+B for Polynomials(25分) This time, you are supposed to findA+BwhereAandBare two polynomials. Input Specification:
1002 A+B for Polynomials (25分) PAT_A
技術標籤:PAT甲級 1002 A+B for Polynomials (25分) This time, you are supposed to find A+B where A and B are two polynomials.
1002 A+B for Polynomials (25分)
技術標籤:# PAT甲級演算法 題目 可以理解為輸入兩個多項式,求和 輸入 2 1 2.4 0 3.2 2 2 1.5 1 0.5
東秦oj 1003 A+B 一直加 直到遇到輸入0 0
技術標籤:java 題目來源: NEUQ OJ平臺 平臺要求: 不要寫註釋 類名寫為Main 注:在本博文中題目實現程式碼語言為java
PAT A1002 A+B for Polynomials (25分)
技術標籤:PAT記錄c語言資料結構 PAT A1002 A+B for Polynomials (25分) This time, you are supposed to find A+B where A and B are two polynomials.
1002 A+B for Polynomials (25 分)
技術標籤:PAT甲級試題 題目連結:1002 A+B for Polynomials (25 分) 題目大意:給出格式相同的兩行,第一行的第一個整數K表示多項式A的非零項的個數,後面的每兩個數表示一項,分別是該項的指數和係數;第二行則
PAT甲級 1002 A+B for Polynomials (25 分) -- setiosflags( )的用法
技術標籤:PAT甲級 先粘題 原題連結:https://pintia.cn/problem-sets/994805342720868352/problems/994805526272000000
PAT 1002 A+B for Polynomials
PAT 1002 A+B for Polynomials 題目含義 就是兩個指數多項式相加,然後輸出結果。 結果第一個數是多項式中元素的個數,然後就是按照指數從大到小輸出各個元素。
1002 A+B for Polynomials (25 分)(模擬)
Description This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, and each line contains the information
HDUOJ---1867 A + B for you again
A + B for you again Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3432 Accepted Submission(s): 869