Submission #645589

# Submission time Handle Problem Language Result Execution time Memory
645589 2022-09-27T11:38:42 Z ymm Nadan (COCI18_nadan) C++17
50 / 50
1 ms 324 KB
#include <bits/stdc++.h>
#define Loop(x,l,r) for (ll x = (l); x < (r); ++x)
#define LoopR(x,l,r) for (ll x = (r)-1; x >= (l); --x)
typedef long long ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll , ll > pll;
using namespace std;

int main()
{
	cin.tie(0) -> sync_with_stdio(false);
	int x, y;
	cin >> x >> y;
	for (int z=1; y > 1; ++z) {
		cout << z << '\n';
		x -= z;
		y -= 1;
	}
	cout << x << '\n';
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 316 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 324 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 316 KB Output is correct
9 Correct 1 ms 316 KB Output is correct
10 Correct 1 ms 212 KB Output is correct