#ABC475G. 约数最多的数 / Has Many Divisors
约数最多的数 / Has Many Divisors
Problem Statement
You are given integers and , each at least .
Among the positive integers at most that are not multiples of , find one with the maximum number of positive divisors. If there are multiple such positive integers, output any one of them.
You are given test cases; solve each of them.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Here, represents the -th test case, and is given in the following format:
Output
Output lines. The -th line should contain the answer for the -th test case.
4
10 2
17 4
2026 919
1000000000000 48
9
15
1680
843291048600
The positive integers at most that are not multiples of are the five integers , and the numbers of their positive divisors are , respectively. Therefore, output for the first test case.
For the second test case, besides in the sample output, outputting any of is also accepted.
- Source: AtCoder ABC 475 G
相关
在下列比赛中: