Source Code
#include <bits/stdc++.h>
#define pii pair<int,int>
#define F first
#define S second
#define mp make_pair
using namespace std;
void solve(){
    int n ;
    cin>>n ;
    vector<int> a(n) ;
    for(int&x:a) cin>>x ;
    int value = 0;
    for(int&x:a) value+=x ;
    cout << value/2 ;
}
int main(){
    int t=1;
  //  cin>>t;
    while(t--){
        solve() ;
        cout << '\n' ;
    }
    return 0 ;
}
Copy
Tha Bits Boredom
GNU G++17
0 ms
360 KB
Wrong Answer