#f. 1IXMMMl3SjX0Wg#'!:*
1IXMMMl3SjX0Wg#'!:*
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Statement
There are digital panels placed in a straight line. Each panel can show any digit from to . Initially, all panels show .
Every second, the digit shown by each panel increases by . In other words, at the end of every second, a panel that showed would now show , a panel that showed would now show , a panel that showed would now show , and so on.
When a panel is paused, the digit displayed on the panel does not change in the subsequent seconds.
You must pause exactly one of these panels, at any second you wish. Then, the panels adjacent to it get paused one second later, the panels adjacent to those get paused seconds later, and so on. In other words, if you pause panel , panel (for all valid ) would be paused exactly seconds later.
For example, suppose there are panels, and the -rd panel is paused when the digit is on it.
- The panel pauses seconds later, so it has the digit ;
- the panel pauses second later, so it has the digit ;
- the panel pauses second later, so it has the digit .
The resulting -digit number is . Note that this example is not optimal for .
Once all panels have been paused, you write the digits displayed on them from left to right, to form an digit number (it can consist of leading zeros). What is the largest possible number you can get? Initially, all panels show .
Format
Input
The first line of the input contains a single integer ( ) — the number of test cases. Each test case consists of a single line containing a single integer ( ).
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case, print the largest number you can achieve, if you pause one panel optimally.
Sample
2
1
2
9
98
ShanghaiTech ACM 炸鱼杯
- 状态
- 已结束
- 规则
- OI
- 题目
- 46
- 开始于
- 2024-12-10 23:00
- 结束于
- 2024-12-15 13:00
- 持续时间
- 110 小时
- 主持人
- 参赛人数
- 112