Advertisement
kot_mapku3

2 A

Jun 2nd, 2020
610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.     ios::sync_with_stdio(false);
  7.     cin.tie(nullptr);
  8.  
  9.     int n;
  10.     long long sum = 0;
  11.     cin >> n;
  12.     long long x;
  13.  
  14.     for (int i = 0; i < n; ++i) {
  15.         cin >> x;
  16.         sum += x;
  17.     }
  18.  
  19.     cout << sum;
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement