CF1096A.Find Divisible
入门
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You are given a range of positive integers from l to r.
Find such a pair of integers (x,y) that l≤x,y≤r, x=y and x divides y.
If there are multiple answers, print any of them.
You are also asked to answer T independent queries.
给你一个从 l 到 r 的正整数区间。
请找出一对整数 (x,y),满足 l≤x,y≤r,x=y,且 x 整除 y。
若存在多组解,输出任意一组即可。
你还需要回答 T 个相互独立的查询。
输入格式
The first line contains a single integer T (1≤T≤1000) — the number of queries.
Each of the next T lines contains two integers l and r (1≤l≤r≤998244353) — inclusive borders of the range.
It is guaranteed that testset only includes queries, which have at least one suitable pair.
第一行包含一个整数 T(1≤T≤1000)—— 查询次数。
接下来的 T 行,每行包含两个整数 l 和 r(1≤l≤r≤998244353)—— 区间的闭区间边界。
保证测试数据中所有查询均至少存在一对满足条件的数。
输出格式
Print T lines, each line should contain the answer — two integers x and y such that l≤x,y≤r, x=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.
输出 T 行,每行应包含答案——两个整数 x 和 y,满足 l≤x,y≤r,x=y,且 x 整除 y。第 i 行的答案应对应输入中的第 i 个查询。
若存在多个答案,输出任意一个即可。
输入输出样例
输入#1
3 1 10 3 14 1 10
输出#1
1 7 3 9 5 10
输入解题思路,AI测评打分。不知道怎么写?