| TheForces Round #12 (Double-Forces) |
|---|
| Закончено |
You have $$$n$$$ matchsticks.Your task is to combine them to make a number..
Here're some restrictions:
Find the largest possible number.
The first line of input will contain a single integer $$$t(1 \leq t \leq 1000)$$$, denoting the number of test cases.
Each test case consists of a line of input.The only line of each test case contains two integers $$$n(2 \leq n \leq 1000),k(1 \leq k \leq 1000)$$$.
For each test case, output on a new line — the the biggest number you can get.
3 1000 1 2 1000 9 2
9 1 97
| Название |
|---|


