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

时间:2021-12-11 15:13:51

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 same aim.

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
in one line, and with one line of output for each line in input.

Sample Input

1 5
10 20

Sample Output

6
30
 #include<iostream>
#include<string>
using namespace std;
int main()
{
int a,b;
int sum;
string result;
char s[];
while(cin>>a>>b)
{
if(a == && b == )
break;
sum = a+b;
sprintf(s, "%d",sum);
result += s;
result += "\n";
}
cout<<result;
return ;
}

武汉科技大学ACM :1001: A+B for Input-Output Practice (I)的更多相关文章

  1. 武汉科技大学ACM :1008&colon; A&plus;B for Input-Output Practice &lpar;VIII&rpar;

    Problem Description Your task is to calculate the sum of some integers. Input Input contains an inte ...

  2. 武汉科技大学ACM :1007&colon; A&plus;B for Input-Output Practice &lpar;VII&rpar;

    Problem Description Your task is to Calculate a + b. Input The input will consist of a series of pai ...

  3. 武汉科技大学ACM :1006&colon; A&plus;B for Input-Output Practice &lpar;VI&rpar;

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

  4. 武汉科技大学ACM :1005&colon; A&plus;B for Input-Output Practice &lpar;V&rpar;

    Problem Description Your task is to calculate the sum of some integers. Input Input contains an inte ...

  5. 武汉科技大学ACM :1004&colon; A&plus;B for Input-Output Practice &lpar;IV&rpar;

    Problem Description Your task is to Calculate the sum of some integers. Input Input contains multipl ...

  6. 武汉科技大学ACM :1003&colon; A&plus;B for Input-Output Practice &lpar;III&rpar;

    Problem Description Your task is to Calculate a + b. Input Input contains multiple test cases. Each ...

  7. 武汉科技大学ACM :1002&colon; A&plus;B for Input-Output Practice &lpar;II&rpar;

    Problem Description Your task is to Calculate a + b. Input Input contains an integer N in the first ...

  8. 武汉科技大学ACM:1006&colon; 我是老大

    Problem Description 今年是2021年,正值武汉科技大学 ACM俱乐部成立10周年.十周年庆祝那天,从ACM俱乐部走出去的各路牛人欢聚一堂,其乐融融.庆祝晚会上,大家纷纷向俱乐部伸出 ...

  9. 武汉科技大学ACM:1005&colon; Soapbear and Honey

    Problem Description Soapbear is the mascot of WHUACM team. Like other bears, Soapbear loves honey ve ...

随机推荐

  1. Windows Phone下的Socket编程

    讨论下有关于Windows Phone下的Socket编程方面的知识. Socket就是通常所称的套接字,用于描述IP地址和端口,是一个通信链的句柄.应用程序通常通过Socket向网络发出请求或者应答 ...

  2. 程序4-6 utime函数实例

    //http://blog.chinaunix.net/uid-24549279-id-71355.html /* ========================================== ...

  3. 284&period;&Tab;Peeking Iterator

    题目: Given an Iterator class interface with methods: next() and hasNext(), design and implement a Pee ...

  4. C&num;导出DataGridView到Excel

    public class ExcelHelper { private static object missing = Type.Missing; #region ================导出= ...

  5. C&num;程序设计六大原则记录

    本文目的在于记录,方便以后的回顾 http://www.uml.org.cn/sjms/201211023.asp 设计模式六大原则(1):单一职责原则 定义:不要存在多于一个导致类变更的原因.通俗的 ...

  6. linux c中select使用技巧

    1.select函数作为定时器使用    it_value.tv_sec = 0;    it_value.tv_usec = 100000:    select(1,NULL,NULL,NULL,& ...

  7. 获取博客积分排名,存入数据库,读取数据进行绘图&lpar;python&comma;selenium&comma;matplotlib&rpar;

    该脚本的目的:获取博客的排名和积分,将抓取时间,排名,积分存入数据库,然后把最近的积分和排名信息进行绘图,查看积分或者排名的变化情况. 整个脚本的流程:是利用python3来编写,利用selnium获 ...

  8. Azure ARM &lpar;18&rpar; 将传统的ASM VM迁移到ARM VM &lpar;1&rpar;

    <Windows Azure Platform 系列文章目录> 目前很多客户陆续的把传统ASM VM迁移至ARM VM.我这里简单介绍一下. 整个迁移过程分为: 1.Validate,Az ...

  9. 前端开发需要掌握的SEO的知识点

    SEO 工作的目的 seo 的工作目的是为了让网站更利于让各大搜索引擎抓取和收录,增加产品的曝光率. SEO 注意事项 1. 网站 TDK 标签的设置.title,description,keywor ...

  10. KONE-FLOW Vistor Key

    WELCOME TO KONE