Problem list
Log in
#coci00495 · COCI 2018/2019 Contest 1

Nadan

Bronze III 1.0 s 64 MB

1 $s / 64$ $MB / 50$ points

Alongside being a palindrome, Nadan is also a successful businessman who finances young

software developers when they start working on their projects. This year, he decided to distribute ​$K$

kunas (Croatian currency) to ​$N$ projects in a way that each project gets at least one kuna and all

projects get a different amounts of kunas. This will always be possible.

Write a program which will, for a given ​$N$ ​and ​$K$​, find one possible distribution of ​$K$ kunas to ​$N$

projects.

Input

The first line contains a positive integer ​$K$​ (100 ≤ ​$K$​ ≤ 1 000 000), number from the task description. The second line contains a positive integer ​$N$​ (1 ≤ ​$N$​ ≤ 100), number from the task description.

Output

For a chosen money distribution, output the amount of money the first project will get in the first line,

the amount of money the second project will get in the second line and so on until the ​$N$​-th line where

you should output the amount of money the ​$N$​-th project will get.

Constraints

In test cases worth 25 points, it will hold that ​$N$​ = 5. If your solution outputs a distribution where all projects didn’t get a different amount of kunas, you will

get 3 out of the possible 5 points for that test case.

Example 1

Input
100
5

200
1

100
4
Output
output
output
10
30
20
5
35

200

21
36
12
31
Source
COCI 2018/2019 Contest 1
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code