| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 4 초 | 1024 MB | 246 | 81 | 63 | 36.628% |
An integer is called a repdigit if it is positive and its decimal representation consists of repeated instances of the same digit. For example, 1ドル,ドル 666ドル,ドル 4444ドル,ドル and 999999ドル$ are repdigits, while 0ドル,ドル 44244ドル,ドル 50216ドル,ドル and 787788ドル$ are not.
You are given a positive integer $n$. It is known that $n$ can be represented as $n = a + b,ドル where $a$ and $b$ are repdigits. Find any such representation.
Each test contains multiple test cases. The first line contains the number of test cases $t$ (1ドル \le t \le 10^4$). The description of the test cases follows.
The only line of each test case contains a single integer $n$ without leading zeros (2ドル \le n < 10^{4000}$). It is guaranteed that $n$ can be represented as $n = a + b,ドル where $a$ and $b$ are repdigits.
It is guaranteed that the total number of digits in $n$ over all test cases does not exceed 10ドル^5$.
For each test case, print two integers $a$ and $b$ such that $n = a + b$ and both $a$ and $b$ are repdigits.
If there are multiple solutions, print any of them.
6 2 786 1332 89110 2333333 10000000000000000000000000001
1 1 777 9 333 999 88888 222 2222222 111111 9999999999999999999999999999 2