文档介绍:1001SumProblem 21089A+BforInput-OutputPractice(I) 41090A+BforInput-OutputPractice(II) 61091A+BforInput-OutputPractice(III) 81092A+BforInput-OutputPractice(IV) 91093A+BforInput-OutputPractice(V) 111094A+BforInput-OutputPractice(VI) 121095A+BforInput-OutputPractice(VII) 131096A+BforInput-OutputPractice(VIII) 142000ASCII码排序 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学号:10105041341001SumProblemProblemDescriptionHey,etoHDOJ(HangzhouDianziUniversityOnlineJudge).Inthisproblem,yourtaskistocalculateSUM(n)=1+2+3+...+n. InputTheinputwillconsistofaseriesofintegersn,oneintegerperline. OutputForeachcase,outputSUM(n)inoneline,-bitsignedinteger. SampleInput1100 SampleOutput15050 AuthorDOOMIII解答:#include<>main(){intn,i,sum;sum=0;while((scanf("%d",&n)!=-1)){sum=0;for(i=0;i<=n;i++)sum+=i;printf("%d\n\n",sum);}}1089A+BforInput-OutputPractice(I)ProblemDescriptionYourtaskistoCalculatea+?!Ofcourse!,yes,alltheseproblemsweredesignedforthesameaim. InputTheinputwillconsistofaseriesofpairsofintegersaandb,separatedbyaspace,onepairofintegersperline. OutputForeachpairofinputintegersaandbyoushouldoutputthesumofaandbinoneline,andwithonelineofoutputforeachlineininput. SampleInput151020 SampleOutput630 Authorlcy mendJGShining解答:#include<>main(){inta,b;while(scanf("%d%d",&a,&b)!=EOF)printf("%d\n",a+b);}1090A+BforInput-OutputPractice(II)ProblemDescriptionYourtaskistoCalculatea+b. InputInputcontainsanintegerNinthefirstline,,separatedbyaspace,onepairofintegersperline. OutputForeachpairofinputintegersaandbyoushouldoutputt