好文档就是一把金锄头!
欢迎来到金锄头文库![会员中心]
电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

杭电题目acm答案.doc

54页
  • 卖家[上传人]:飞***
  • 文档编号:32672057
  • 上传时间:2018-02-12
  • 文档格式:DOC
  • 文档大小:351KB
  • / 54 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 选修课考试作业1001 Sum Problem.............................................................................................................................21089 A+B for Input-Output Practice (I) .........................................................................................41090 A+B for Input-Output Practice (II)........................................................................................61091 A+B for Input-Output Practice (III).......................................................................................81092 A+B for Input-Output Practice (IV) ........................................................................................91093 A+B for Input-Output Practice (V)......................................................................................111094 A+B for Input-Output Practice (VI) ....................................................................................121095 A+B for Input-Output Practice (VII).....................................................................................131096 A+B for Input-Output Practice (VIII)..................................................................................142000 ASCII 码排序 .........................................................................................................................162001 计算两点间的距离 .................................................................................................................172002 计算球体积 .............................................................................................................................192003 求绝对值 .................................................................................................................................202004 成绩转换 .................................................................................................................................212005 第几天? .................................................................................................................................222006 求奇数的乘积 .........................................................................................................................242007 平方和与立方和 .....................................................................................................................262008 数值统计 .................................................................................................................................272009 求数列的和 .............................................................................................................................282010 水仙花数 .................................................................................................................................292011 多项式求和 .............................................................................................................................312012 素数判定 .................................................................................................................................332014 青年歌手大奖赛_评委会打分 ...............................................................................................342015 偶数求和 .................................................................................................................................362016 数据的交换输出 .....................................................................................................................382017 字符串统计 .............................................................................................................................402019 数列有序! ...............................................................................................................................412020 绝对值排序 .............................................................................................................................432021 发工资咯:) .........................................................................................................................452033 人见人爱 A+B........................................................................................................................462039 三角形 .....................................................................................................................................482040 亲和数 .....................................................................................................................................49姓名:郑春杰班级:电商 1001学号:10105041341001 Sum ProblemProblem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n.InputThe input will consist of a series of integers n, one integer per line.OutputFor each case, output SUM(n) in one line, followed by a blank line. You may assume the result will be in the range of 32-bit signed integer.Sample Input1100Sample Output15050AuthorDOOM III解答:#includemain(){int n,i,sum;sum=0;while((scanf("%d",&n)!=-1)){sum=0;for(i=0;imain(){int a,b;while(scanf("%d%d",&a,&b)!=EOF)printf("%d\n",a+b);}1090 A+B for Input。

      点击阅读更多内容
      关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
      手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
      ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.