

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
以上 以下の正整数 が与えられます。
以下の条件を共に満たす正整数の組 を一つ求めてください。ただし、制約下でそのような正整数の組が必ず存在することが証明できます。
- はどちらも 以上 以下の正整数である。
- が の倍数となるような正整数 が存在し、その最小値は である。
個のテストケースが与えられるので、それぞれについて答えを求めてください。
制約
- 入力される値は全て整数
入力
入力は以下の形式で標準入力から与えられる。
ここで、 は 番目のテストケースを意味する。
各テストケースは以下の形式で与えられる。
出力
それぞれのケースについて、条件を満たす正整数の組 を以下の形式で出力せよ。
条件を満たす解が複数存在する場合、どれを出力しても正解とみなされる。
入力例 1Copy
4 3 16 1 55
出力例 1Copy
2 7 11 68 20250126 1 33 662
について考えます。
例えば とすると
- のとき: は の倍数ではない。
- のとき: は の倍数ではない。
- のとき: は の倍数である。
となり、条件を満たす最小の は になることが確認できます。したがって、 を出力すると正答となります。 この他にも、例えば などが条件を満たします。
Score : points
Problem Statement
You are given a positive integer between and , inclusive.
Find one pair of positive integers satisfying the following conditions. It can be proved that such a pair of integers always exists under the constraints.
- Both and are positive integers between and , inclusive.
- There exists a positive integer such that is a multiple of , and the smallest such is .
You are given test cases; solve each of them.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Here, denotes the -th test case.
Each test case is given in the following format:
Output
For each test case, print a pair of positive integers in the following format:
If there are multiple valid solutions, any one of them is considered correct.
Sample Input 1Copy
4 3 16 1 55
Sample Output 1Copy
2 7 11 68 20250126 1 33 662
Consider .
For example, if we choose , then:
- When : is not a multiple of .
- When : is not a multiple of .
- When : is a multiple of .
Hence, the smallest for which is a multiple of is . Therefore, is a correct solution. Other valid solutions include .