1002: A+B for Input-Output Practice (II)
技術標籤:WUSTOJ
Description
計算 a + b.
Input
多組測試資料。
第一行給出整數n,表示共有n組測試資料。
接下來n行,每行2個整數。
Output
每組測試資料輸出兩個整數的和。
Sample Input
2
1 5
10 20
Sample Output
6
30
Code
#include<iostream> using namespace std; int main() { int n; int a,b; cin>>n; while(n--) { cin>>a>>b; cout<<a+b<<endl; } return 0; }
相關推薦
1002: A+B for Input-Output Practice (II)
技術標籤:WUSTOJ Description 計算 a + b. Input 多組測試資料。 第一行給出整數n,表示共有n組測試資料。
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
1003: A+B for Input-Output Practice (III)
技術標籤:WUSTOJ Description 計算 a + b. Input 多組測試資料,每組測試資料佔一行,包括2個整數,如果2個整數都為0,則表示測試結束。
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
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
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
1002 A+B for Polynomials (附測試點3456的坑)
題目:1002 A+B for Polynomials This time, you are supposed to find A+B where A and B are two polynomials.
HDU 1002 A + B Problem II(大數相加)
HDU 1002 A + B Problem II 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.
HDOJ 1002 A + B Problem II
題目描述 我有一個非常簡單的問題要問你。給定兩個整數A和B,你要做的就是計算A + B的和。
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.