#include <iostream>
using namespace std;
int PowerStrip[15];
int main()
{
int tc, k, i, sum, ans;
cin >> tc;
while (tc--){
cin >> k;
sum = 0;
for (i = 0; i < k; i++){
cin >> PowerStrip[i];
sum += PowerStrip[i];
}
ans = sum - k + 1;
cout << ans << endl;
}
system("pause");
}
poj 2636 Electrical Outlets
最新推荐文章于 2017-04-12 19:43:25 发布