Submission #311471

#TimeUsernameProblemLanguageResultExecution timeMemory
311471tevdoreK blocks (IZhO14_blocks)C++14
0 / 100
1 ms256 KiB
#include<bits/stdc++.h> using namespace std; const int N = 2e6 + 10; long long n, k, ans; long long 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...