#K82802. Circular Distribution of Items

    ID: 36056 Type: Default 1000ms 256MiB

Circular Distribution of Items

Circular Distribution of Items

You are given N points arranged in a circle and K items that need to be distributed among these points. The distribution is done in a sequential circular order. Specifically, the first item goes to the first point, the second item goes to the second point, and so on. After the Nth point, distribution resumes from the first point again. Formally, for each item i (0-indexed), it is assigned to point with index i \mod N, where \(i \mod N\) denotes the remainder when \(i\) is divided by \(N\).

Your task is to compute the number of items each point will have after distributing all K items.

Example:

Input: 5 7
Output: 2 2 1 1 1

This corresponds to: the first point gets 2 items, the second gets 2 items, and the remaining points get 1 item each.

inputFormat

The input consists of a single line containing two space-separated integers:

  • N (1 \le N \le 10^5): the number of points in the circle.
  • K (0 \le K \le 10^9): the number of items to distribute.

Input is provided through standard input (stdin).

outputFormat

Output a single line containing N integers separated by a single space. These integers represent the number of items at each point in order. The output must be written to standard output (stdout).

## sample
5 7
2 2 1 1 1