#P11156. 【MX-X6-T2】もしも
【MX-X6-T2】もしも
Background
Original problem link: https://oier.team/problems/X6C。
もしも 数字がない世界だったら 生きる期限なんて なかったのかな もしもの話なら良かった また出逢えるからって 言うんだ またね。
Can division help us erase the numbers in this world?
If not, can we meet again?
Problem Description
Suppose there is a positive integer sequence , where:
- For , equals rounded up;
- For any , .
Now given and , find any possible pair .
Rounding up a number means the smallest integer . For example, rounded up equals , and rounded up equals .
Input Format
Each test point contains multiple sets of testdata. The first line contains an integer , the number of test cases.
Then follow lines. Each line contains two integers separated by a space, representing for that test case.
Output Format
For each test case, output one line with two integers, representing one possible pair . If there are multiple solutions, output any one. It can be proven that within the constraints of this problem, a solution always exists.
3
3 1
3 2
6 3
114 514
2005 1130
59001 897
Hint
Sample Explanation
For the three test cases, the sequences are:
- ;
- ;
- 。
Constraints
For all testdata, , , .
There are groups of testdata in total:
- For the first groups, additionally , ;
- For the first groups, additionally ;
- For groups and , additionally 。
Translated by ChatGPT 5