A+B for Input-Output Practice (VIII) 为什么 我在 杭电 上 做是 Presentation Error!Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line,and then N lines follow.Each line star
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 18:02:39
A+B for Input-Output Practice (VIII) 为什么 我在 杭电 上 做是 Presentation Error!Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line,and then N lines follow.Each line star
A+B for Input-Output Practice (VIII) 为什么 我在 杭电 上 做是 Presentation Error!
Problem Description
Your task is to calculate the sum of some integers.
Input
Input contains an integer N in the first line,and then N lines follow.Each line starts with a integer M,and then M integers follow in the same line.
Output
For each group of input integers you should output their sum in one line,and you must note that there is a blank line between outputs.
Sample Input
3
4 1 2 3 4
5 1 2 3 4 5
3 1 2 3
Sample Output
10
15
6
Author
lcy
Recommend
JGShining
#include
int main( )
{
\x05int a,b,i,j,m,n;
while(scanf("%d",&n)!=EOF)
\x05{
\x05\x05for(j=0;j
A+B for Input-Output Practice (VIII) 为什么 我在 杭电 上 做是 Presentation Error!Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line,and then N lines follow.Each line star
#include
int main()
{
int N;
scanf("%d",&N);
while(N--)
{
int M,i,a,sum=0;
scanf("%d",&M);
for(i=0;i