题目:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=369698
代码:
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
int a[1005];
int sum=0;
for(int i=0;i<n;i++)
{
scanf("%d",&a[i]);
sum=sum+a[i];
}
printf("%d\n",sum+n);
}
}