Submission #460730

# Submission time Handle Problem Language Result Execution time Memory
460730 2021-08-09T08:47:18 Z grt Nadan (COCI18_nadan) C++17
50 / 50
1 ms 204 KB
#include <bits/stdc++.h>
#define PB push_back
#define ST first
#define ND second
#define _ ios_base::sync_with_stdio(0); cin.tie(0);
//mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

using namespace std;

using ll = long long;
using pi = pair<int,int>;
using vi = vector<int>;

int k, n;

int main() {_
	cin >> k >> n;
	for(int i = 1; i <= n; ++i) {
		if(i < n) {
			cout << i << "\n";
			k -= i;
		} else {
			cout << k;
		}
	}
	
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct