fork download
  1. #include<bits/stdc++.h>
  2. #define ll long long int
  3. #define BOOSTER std::ios_base::sync_with_stdio(NULL);cin.tie(0);cout.tie(0);
  4. #define REPEAT int t;while(t--)
  5. using namespace std;
  6. int main(){
  7. BOOSTER
  8. REPEAT{
  9. ll n,i,temp;
  10. cin>>n;
  11. ll a[n];
  12. for(i=0;i<n;i++)
  13. {
  14. cin>>a[i];
  15. }
  16. temp=accumulate(a,a+n,0);
  17. cout<<floor(temp);
  18. /*if((floor(temp)/n)<4){
  19.   cout<<"No"<<endl;
  20.   }else{
  21.   cout<<"Yes"<<endl;
  22.   }*/
  23. }
  24. }
Success #stdin #stdout 0s 4320KB
stdin
1
5
3 5 4 4 3
stdout
Standard output is empty