武汉科技大学ACM :1007: A+B for Input-Output Practice (VII)

Problem 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.

Output

For each pair of input integers a and b you should output the sum of a and b.

Print a blank line between each case .

Sample Input

1 5
10 20

Sample Output

6

30
#include <iostream>
using namespace std;  

int main()
{
    int i,j;  

    while(cin >> i >> j)
        cout << (i + j) << endl << endl;  

return 0;
}  
				
时间: 2024-10-07 12:24:53

武汉科技大学ACM :1007: A+B for Input-Output Practice (VII)的相关文章

武汉科技大学ACM :1001: A+B for Input-Output Practice (I)

Problem Description Your task is to Calculate a + b. Too easy?! Of course! I specially designed the problem for acm beginners.  You must have found that some problems have the same titles with this one, yes, all these problems were designed for the s

武汉科技大学ACM :1002: A+B for Input-Output Practice (II)

Problem Description Your task is to Calculate a + b. Input Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a space, one pair of integers per line. Output For each

武汉科技大学ACM :1005: A+B for Input-Output Practice (V)

Problem 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, and then M integers follow in the same line. Output For each grou

武汉科技大学ACM :1008: A+B for Input-Output Practice (VIII)

Problem 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, and then M integers follow in the same line. Output For each grou

武汉科技大学ACM:1006: 我是老大

Problem Description 今年是2021年,正值武汉科技大学 ACM俱乐部成立10周年.十周年庆祝那天,从ACM俱乐部走出去的各路牛人欢聚一堂,其乐融融.庆祝晚会上,大家纷纷向俱乐部伸出援手,帮助俱乐部度过 经济难关(经费严重不足).其中就职于谷歌的BobLee.Facebook的YYD,自己创办ILOVEMCB公司的MCB,苹果的明爷,IBM的胖富 帅,微软的男神坐在一桌上.胖富帅说我捐a万美元,明爷说a万美元算什么我捐你的两倍,男神说我捐你们两和的4/5,YYD说你们太年轻了,

武汉科技大学ACM:1005: Soapbear and Honey

Problem Description Soapbear is the mascot of WHUACM team. Like other bears, Soapbear loves honey very much, so he decides to get some honeycombs for honey. There are N honeycombs hanging on some trees, numbered from 1 to N, and the height of honeyco

武汉科技大学ACM :1007: 华科版C语言程序设计教程(第二版)例题4.13

Problem Description 输入两个整数,求他们的最大公约数和最小公倍数. Input 两个整数. Output 最大公约数和最小公倍数. Sample Input 12 9 Sample Output 3 36 HINT 可以把求最小公约数和最小公倍数写成函数,方便以后调用. 1 #include <stdio.h> 2 3 void main() 4 5 { 6 7 int m,n; 8 9 while(scanf("%d%d",&m,&n)

武汉科技大学ACM:1007: 文本编辑器

Problem Description YB打算写一个功能强大的文本编辑器,并取一个炫酷拉风,高端优雅的名字,比如“YB牌文本编辑器”之类的.既然功能强大,那肯定得有个查找功能吧.但是他在完成这个功能的时候遇到一点小问题.现在来请求你的帮助. 给你一个文本串s和一个模式串t,你需要写一个程序来查找t在s中出现了多少次. Input 第一行是一个正整数T,表示总共有T组测试数据. 接下来有T组测试,每组测试数据包括两行.第一行是文本串s,长度不大于10000.第二行是模式串t,长度不大于10.都是

武汉科技大学ACM:1007: 陶陶摘苹果

Problem Description 陶陶家的院子里有一棵苹果树,每到秋天树上就会结出10个苹果.苹果成熟的时候,陶陶就会跑去摘苹果.陶陶有个30厘米高的板凳,当她不能直接用手摘到苹果的时候,就会踩到板凳上再试试. 现在已知10个苹果到地面的高度,以及陶陶把手伸直的时候能够达到的最大高度,请帮陶陶算一下她能够摘到的苹果的数目.假设她碰到苹果,苹果就会掉下来. Input 输入包括两行数据.第一行包含10个100到200之间(包括100和200)的整数(以厘米为单位)分别表示10个苹果到地面的高