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