杭电ACM1092题目 Problem Description Your task is to Calculate the sum of some integers.Input Input#include"stdio.h"int main(){int a,b,n;a=0;while(scanf("%d",&n)!=EOF){while(n--){scanf("%d",&b);a=a+b;}printf("%d\n",a);}return 0;}错在哪里啊啊

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/06 23:30:52
杭电ACM1092题目 Problem Description Your task is to Calculate the sum of some integers.Input Input#include

杭电ACM1092题目 Problem Description Your task is to Calculate the sum of some integers.Input Input#include"stdio.h"int main(){int a,b,n;a=0;while(scanf("%d",&n)!=EOF){while(n--){scanf("%d",&b);a=a+b;}printf("%d\n",a);}return 0;}错在哪里啊啊
杭电ACM1092题目 Problem Description Your task is to Calculate the sum of some integers.Input Input
#include"stdio.h"
int main()
{
int a,b,n;
a=0;
while(scanf("%d",&n)!=EOF){
while(n--){
scanf("%d",&b);
a=a+b;
}
printf("%d\n",a);
}
return 0;
}
错在哪里啊啊,说的基础点的额

杭电ACM1092题目 Problem Description Your task is to Calculate the sum of some integers.Input Input#include"stdio.h"int main(){int a,b,n;a=0;while(scanf("%d",&n)!=EOF){while(n--){scanf("%d",&b);a=a+b;}printf("%d\n",a);}return 0;}错在哪里啊啊
1、你的a=0放的地方不对,你这样的话只有第一次的结果是对的.应该把它放到循环里面
2、题目要求的是N为0时结束,你的代码在N为0时还做了一次输出
3、虽然题目没说整数的范围,但是可能会因为int类型不够,加法会产生溢出

杭电ACM1092题目 Problem Description Your task is to Calculate the sum of some integers.Input Input#includestdio.hint main(){int a,b,n;a=0;while(scanf(%d,&n)!=EOF){while(n--){scanf(%d,&b);a=a+b;}printf(%d ,a);}return 0;}错在哪里啊啊 杭电 acm1999题目意思 杭电ACM problem 1002 A + B Problem II为什么会WRONG ANSWER?计算结果没错啊?#include 杭电1001题目怎么做的 请教杭电ACM1003的题目意思?我看不懂题目的意思Max SumTime Limit:2000/1000 MS (Java/Others) Memory Limit:65536/32768 K (Java/Others)Total Submission(s):53856 Accepted Submission(s):12109Problem DescriptionGiven a sequence a[1],a[2],a[3 杭电acm2034基础题 C++,求改错Problem Description参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是 杭电acm2034 这样写哪里错了Problem Description参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是 入门ACM题目,Problem Description无论是杭电的HDOJ,还是浙大的ZOJ,A+B问题都摆着第一个位置,不过大家都做过A+B,一模一样的题目显然太看不起大家了,所以我们改下规则,描述如下:我们定义26个字母(A 杭电acm2034 这样写哪里错了、、、急啊···Problem Description参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个 杭电acm 2034wrong answer Problem Description参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是做集合 麻烦各位帮我看一下杭电acm2034为什么总是Wrong Answer?/*Problem Description参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B 杭电ACM1003题目意思Problem DescriptionGiven a sequence a[1],a[2],a[3].a[n],your job is to calculate the max sum of a sub-sequence.For example,given (6,-1,5,4,-7),the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.InputThe first line of the i 杭电ACM比赛的题目B.Little Elephant and NumbersTime Limit :4000/2000ms (Java/Other) Memory Limit :524288/262144K (Java/Other)Total Submission(s) :33 Accepted Submission(s) :12Problem DescriptionThe Little Elephant loves numbers.He has a positiv 杭电ACM比赛的一道题目,A.Shooshuns and SequenceTime Limit :4000/2000ms (Java/Other) Memory Limit :524288/262144K (Java/Other)Total Submission(s) :130 Accepted Submission(s) :34Problem DescriptionOne day shooshuns found a sequence of n integer 杭电acm1017题 感觉代码没错,但就是ac不了,我无解了,题目是这样的:Given two integers n and m,count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.This problem contains multiple problem 杭电上的题目Problem Description输入n(n 杭电acm2053题目翻译(不要把代码发上来).