fork download
  1. #include <iostream>
  2. using namespace std ;
  3. int main()
  4. {
  5. int n ;
  6. cin >> n ;
  7. long long sum = 0 ;
  8. for ( int i = 0 ; i < n ; i ++ )
  9. {
  10. int x ; cin >> x ;
  11. sum += x ;
  12. }
  13. cout << sum << endl ;
  14. return 0 ;
  15. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
0