main.cpp 287 B

1234567891011121314151617
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int N;
  5. while (cin >> N) {
  6. int result = 0;
  7. int val = 0;
  8. for (int i = 0; i < N; i++) {
  9. cin >> val;
  10. result += val;
  11. }
  12. cout << result << endl;
  13. }
  14. return 0;
  15. }