CF1096A.Find Divisible

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

You are given a range of positive integers from ll to rr .

Find such a pair of integers (x,y)(x, y) that lx,yrl \le x, y \le r , xyx \ne y and xx divides yy .

If there are multiple answers, print any of them.

You are also asked to answer TT independent queries.

输入格式

The first line contains a single integer TT ( 1T10001 \le T \le 1000 ) — the number of queries.

Each of the next TT lines contains two integers ll and rr ( 1lr9982443531 \le l \le r \le 998244353 ) — inclusive borders of the range.

It is guaranteed that testset only includes queries, which have at least one suitable pair.

输出格式

Print TT lines, each line should contain the answer — two integers xx and yy such that lx,yrl \le x, y \le r , xyx \ne y and xx divides yy . The answer in the ii -th line should correspond to the ii -th query from the input.

If there are multiple answers, print any of them.

输入输出样例

  • 输入#1

    3
    1 10
    3 14
    1 10
    

    输出#1

    1 7
    3 9
    5 10
    
首页