# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1270270 | dgarcia09 | Nadan (COCI18_nadan) | C++20 | 0 ms | 328 KiB |
#include <bits/stdc++.h>
#pragma GCC optimize ("O2")
#define int long long
#define endl '\n'
#define vc vector<int>
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cout.setf(ios::fixed);
cout.precision(0);
int n, k;
cin >> n >> k;
int x = 1;
while (k > 1){
cout << x << endl;
n -= x;
x++;
k--;
}
cout << n << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |