#\. XHXMMMlOPIX0Wg#"'`%
XHXMMMlOPIX0Wg#"'`%
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Statement
Dora has a set containing integers. In the beginning, she will put all integers in into the set . That is, an integer is initially contained in the set if and only if . Then she allows you to perform the following operations:
- Select three distinct integers , , and from the set , such that .
- Then, remove these three integers from the set .
What is the maximum number of operations you can perform?
Recall that means the greatest common divisor of integers and .
Format
Input
Each test consists of multiple test cases. The first line contains a single integer ( ) — the number of test cases. The description of the test cases follows.
The only line of each test case contains two integers and ( ) — the range of integers in the initial set.
Output
For each test case, output a single integer — the maximum number of operations you can perform.
Sample
8
1 3
3 7
10 21
2 8
51 60
2 15
10 26
1 1000
1
1
3
1
2
3
4
250
ShanghaiTech ACM 炸鱼杯
- 状态
- 已结束
- 规则
- OI
- 题目
- 46
- 开始于
- 2024-12-10 23:00
- 结束于
- 2024-12-15 13:00
- 持续时间
- 110 小时
- 主持人
- 参赛人数
- 112