Submission #676271

#TimeUsernameProblemLanguageResultExecution timeMemory
676271TangirkulAutići (COCI22_autici)C++17
10 / 50
13 ms2068 KiB
#include<bits/stdc++.h> #define ll long long #define fi first #define se second #define pb push_back #define sz size #define Junanna ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); using namespace std; const ll K = 32; const ll INF = 1e9 + 7; const ll MOD = 1e9 + 7; const ll N = (1e5 + 125); void ma1n () { ll n; cin >> n; ll sum = 0; ll d[n + 7]; for (ll i = 1; i <= n; i++) { cin >> d[i]; if (i > 1) { sum += d[i] + d[i - 1]; } } cout << sum; } int main () { Junanna; ll t = 1; while (t--) { ma1n (); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...