Universal Cup Judging System

Universal Cup

시간 제한: 3.0 s 메모리 제한: 1024 MB 총점: 100 해킹 가능 ✓
통계

设 $\phi(n)$ 表示欧拉函数:区间 $[1,n]$ 中与 $n$ 互质的整数个数。

给定两个整数 $\ell$ 和 $r$,满足 $r \ge \frac{5\ell}{3}$。请找到两个不同的整数 $x$ 和 $y$,满足 $\ell \le x,y \le r$ 且 $\phi(x)=\phi(y)$,或者报告不存在这样的数对。

输入格式

第一行包含一个整数 $t$($1 \le t \le 20$),表示测试用例的个数。

接下来的 $t$ 行,每行包含两个整数 $\ell$ 和 $r$($1 \le \ell < r \le 10^{17}$),描述一个测试用例。保证 $r \ge \frac{5\ell}{3}$。

输出格式

对于每个测试用例,输出两个整数 $x$ 和 $y$($\ell \le x,y \le r$,$x \ne y$),满足 $\phi(x)=\phi(y)$;如果不存在这样的数对,则输出 -1 -1。如果有多个合法的数对,输出其中任意一个。

样例

输入格式 1

5
1 3
5 10
15 30
21 50
50 100

输出格式 1

1 2
5 8
15 16
21 26
52 56

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.