# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
455150 | 2021-08-05T14:40:30 Z | shahriarkhan | Nadan (COCI18_nadan) | C++14 | 1 ms | 320 KB |
#include<bits/stdc++.h> using namespace std ; int main() { int k , n ; scanf("%d%d",&k,&n) ; vector<int> ans ; for(int i = 1 ; i < n ; ++i) { ans.push_back(i) ; k -= i ; } ans.push_back(k) ; for(int i : ans) { printf("%d\n",i) ; } return 0 ; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 320 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 296 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 0 ms | 204 KB | Output is correct |
9 | Correct | 0 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 204 KB | Output is correct |