By João Marcos Salvanini Bellini de Moraes, IFSULDEMINAS Brazil
The Sect of the Power of 2 Programmers is a sect composed of programmers who program in an amount of time that is always a power of 2. Recently, the leader of this sect, the much-feared Vithan Fender, realized that changes would be necessary so he can achieve his goal, and thus decided that the members not only will have to program in times of powers of 2, but also do every single kind of activity.
The activities will always be done in order of importance, with the first activity (programming) the most important and the last one the least important. Therefore, the members will have to organize the times for these activities according to that order, and if there's time to spare, the member must dedicate it to programming. Besides, the member must always dedicate at least 1 minute to an activity, that is, he must do every activity.
Since you've joined this sect recently, the leader wants you to prove the least of your worth by creating a program that, given the amount of available time of a member and the number of activities to be done, returns the time that should be dedicated to each one of these activities. Meanwhile, Vithan Fender will be dancing to the sound of Fink Ployd, its favorite axé music group.
The input consists of several test cases. Each line has an integer T (1 ≤ T ≤ 1018) and an integer A (1 ≤ A ≤ 103), indicating the available time and the number of acitivities, respectively. The number of activities will never be greater than the available time. Read input until EOF.
For each test case, print the dedicated time to each activity according to the specifications. The times must be separated between blank spaces, but no blank space should be printed after the last time.
|Input Sample||Output Sample|
8 1 1
8 4 2 1
In the first test case, the member needs to do 3 activities in 10 minutes, so he will organize the time in: 8 minutes for the first activity, 1 minute for the second one and 1 minute to the third one, totalizing 10 minutes. He wouldn't choose the times (4, 4, 2), for example, because he wouldn't be following the order of importance, that is to dedicate the maximum possible time to the most important activity.
In the second test case, the member has 11 minutes to do 2 activities, so he must dedicate 8 minutes to programming and 2 minutes to the other activity, sparing 1 minute to dedicate to programming, totalizing 11 minutes (9 to programming and 2 to the other activity).