Submission #1018672

#TimeUsernameProblemLanguageResultExecution timeMemory
1018672vjudge1Autići (COCI22_autici)C++17
0 / 50
24 ms1832 KiB
#include <iostream> using namespace std; int main() { int n,d[100000]; int ans = 0; cin >> n; for(int i = 0;i < n;i++) { cin >> d[i]; } if(n==1) { cout << 0; return 0; } for(int i = 0;i < n-1;i++) { ans += d[i]+d[i+1]; } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...