## Creating a Sequence

View as PDF

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Kirito is tired of maintaining sequences, so he decides to create them instead!

He thinks of two positive integers, and , and then creates a sequence of non-negative integers that sums to .

Because he finds this so relaxing, he invites you to join him! However, you find this just a bit boring, so you decide to also minimize the product of your sequence. Can you write a program that creates such a sequence?

#### Scoring

Your program will get of the points if the numbers sum to , and the remaining if the product is minimized.

#### Input Specification

The first and only line of input will contain two space separated integers, and .

#### Output Specification

Your program should output a single line: space-separated non-negative integers that sum to , such that their product is minimized.

#### Sample Input

2 926

#### Sample Output

223 703

Note that the sample output may not be the most optimal solution.