[HDOJ]1089-A+B for Input-Output Practice (I)
A+B for Input-Output Practice (I)
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 56532 Accepted Submission(s): 31536
Total Submission(s): 56532 Accepted Submission(s): 31536
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.
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
10 20
Sample Output
6
30
30
Author
lcy
Recommend
JGShining
其实还是A+B,只不过变换了输入输出的方式。
贴代码
1 2 3 4 5 6 7 8 9 10 11 |
#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int a,b,c,d; while((scanf("%d%d",&a,&b)!=EOF)) { printf("%d\n",a+b); } return 0; } |
版权声明
转载保留版权: 大D技研室 | 《[HDOJ]1089-A+B for Input-Output Practice (I)》
本文链接地址:https://www.dadclab.com/archives/2870.jiecao
转载须知:如果您需要转载本文,请将版权信息,版权授权方式,以及本文的链接地址注明,谢谢合作。
已有 24 条评论
发表评论
电子邮件地址不会被公开。 必填项已标注。
@第三人称 D3快成抢沙发专业户了。哈哈
大D是水文专业户
@dave 俺一直都是水文专业户
来学习一下,大力支持
我也准备练习做做oj题,提高一点点算法能力,不然,真的很惨~
@lower 加油加油~~
哇卡卡, 大D也开始ACM 了
@52computer 木有木有,只是练习写代码
为虾米 别人都能显示ubuntu, 我的也是ubuntu啊,怎么是GNU ?
@52computer 对了,这个是什么插件?
@52computer 可能是64位的原因
@dave 以前用32位的时候也是这样呢~
@52computer @dave 根据大D的分析,应该是浏览器和操作系统标识,应该是这个叫吧。。wordpress会写数据库,而插件就是读出来这样。
插件的名字是:WP-UserAgent
@dave 32位下用Ubuntu自带的Firefox就可以识别系统。D大也可以试试系统默认浏览器
@52computer 同样是Ubuntu 12.04,我用chrome,操作系统就识别成GNU/Linux,用Firefox 19.0,就可以识别Ubuntu,所以,应该就是UserAgent的问题。
@大D 酱紫,了解了~~
@52computer
再次测试,当前系统,Win7 x64+Chrome 25.0.1364.97
伪装UserAgent Fedora 18 +Chrome 24.0.0.0
@52computer 试试这样搞笑不
@大D 试试这样可以显示不?
@大D 哇卡卡, 感觉好牛逼啊, 怎么改的呀? 教教我类
@52computer 待大D写个水文……哇咔咔
确实是研究所,什么都看不懂啊!
这个的确是什么都看不懂额