Submission #311470

#TimeUsernameProblemLanguageResultExecution timeMemory
311470tevdoreK blocks (IZhO14_blocks)C++14
0 / 100
1 ms384 KiB
#include<bits/stdc++.h> using namespace std; const int N = 2e6 + 10; int n, k, ans; int a[N]; int main() { cin >> n >> k; for(int i = 1; i <= n; i++) cin >> a[i]; for(int i = 1; i < k; i++) ans += a[i]; ans += a[n]; cout << ans << "\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...