305828: CF1096A. Find Divisible

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Find Divisible

题意翻译

每次给你一个范围 $[l,r]$ ,你需要找到一对整数 $(x,y)$ 使得 $y$ 能够被 $x$ 整除,保证有解,$T$ 组询问。

题目描述

You are given a range of positive integers from $ l $ to $ r $ . Find such a pair of integers $ (x, y) $ that $ l \le x, y \le r $ , $ x \ne y $ and $ x $ divides $ y $ . If there are multiple answers, print any of them. You are also asked to answer $ T $ independent queries.

输入输出格式

输入格式


The first line contains a single integer $ T $ ( $ 1 \le T \le 1000 $ ) — the number of queries. Each of the next $ T $ lines contains two integers $ l $ and $ r $ ( $ 1 \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 $ T $ lines, each line should contain the answer — two integers $ x $ and $ y $ such that $ l \le x, y \le r $ , $ x \ne y $ and $ x $ divides $ y $ . The answer in the $ i $ -th line should correspond to the $ i $ -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

Input

题意翻译

每次给你一个范围 $[l,r]$ ,你需要找到一对整数 $(x,y)$ 使得 $y$ 能够被 $x$ 整除,保证有解,$T$ 组询问。

加入题单

上一题 下一题 算法标签: