Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int i,n,m,k,s,r;
- scanf("%d",&n);
- for(i=1;i<=n;i++)
- {
- scanf("%d",&m);
- r=0;
- for(k=1;k<=m;k++)
- {
- scanf("%d",&s);
- r+=s;
- }
- printf("%d\n",r);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement