fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int t, n, a, suma = 0;
  8. cin >> t;
  9. for(int x = 0 ; x < t ; x++)
  10. {
  11. cin >> n;
  12. for(int z = 0 ; z < n ; z++)
  13. {
  14. cin >> a;
  15. suma += a;
  16. }
  17. cout << suma;
  18. }
  19. return 0;
  20.  
  21. }
  22.  
  23.  
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
Standard output is empty