308739: CF1567D. Expression Evaluation Error
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Expression Evaluation Error
题意翻译
Bob 在黑板上写下了 $n$ 个十进制正整数,已知它们在十进制下的和为 $s$。Alice 求出了这些数在 $11$ 进制下的和。 请求出任意一组使得 Alice 求得的 $11$ 进制下的和最大的 $n$ 个数。 数据范围: - $t$ 组数据,$1\leqslant t\leqslant 100$。 - $1\leqslant s\leqslant 10^9$,$1\leqslant n\leqslant \min\{s,100\}$。 Translated by Eason_AC 2021.9.6题目描述
On the board, Bob wrote $ n $ positive integers in [base](https://en.wikipedia.org/wiki/Positional_notation#Base_of_the_numeral_system) $ 10 $ with sum $ s $ (i. e. in decimal numeral system). Alice sees the board, but accidentally interprets the numbers on the board as base- $ 11 $ integers and adds them up (in base $ 11 $ ). What numbers should Bob write on the board, so Alice's sum is as large as possible?输入输出格式
输入格式
The input consists of multiple test cases. The first line contains an integer $ t $ ( $ 1 \leq t \leq 100 $ ) — the number of test cases. The description of the test cases follows. The only line of each test case contains two integers $ s $ and $ n $ ( $ 1 \leq s \leq 10^9 $ ; $ 1 \leq n \leq \min(100, s) $ ) — the sum and amount of numbers on the board, respectively. Numbers $ s $ and $ n $ are given in decimal notation (base $ 10 $ ).
输出格式
For each test case, output $ n $ positive integers — the numbers Bob should write on the board, so Alice's sum is as large as possible. If there are multiple answers, print any of them.
输入输出样例
输入样例 #1
6
97 2
17 1
111 4
100 2
10 9
999999 3
输出样例 #1
70 27
17
3 4 100 4
10 90
1 1 2 1 1 1 1 1 1
999900 90 9