Advertisement
kadeyrov

Untitled

Aug 25th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <algorithm>
  4. #include <vector>
  5. #include <string>
  6. #include <set>
  7.  
  8. using namespace std;
  9.  
  10. int main () {
  11.     int n;
  12.     cin >> n;
  13.    
  14.     long long ans = 0;
  15.    
  16.     while (n--) {
  17.         int x;
  18.         cin >> x;
  19.         ans += x;
  20.     }
  21.    
  22.     cout << ans <<endl;
  23.    
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement