No.1611 Minimum Multiple with Double Divisors
Problem Statement
M.M., who loves multiples and divisors, became curious about the following: for a positive integer $X$, what is the smallest positive integer $Y$ satisfying both of the following conditions?
- $Y$ is a multiple of $X$.
- The number of positive divisors of $Y$ is exactly $2$ times the number of positive divisors of $X$.
You are given $T$ test cases. For each of them, tell him the answer to the problem above.
Input
$T$ $X_1$ $X_2$ $\vdots$ $X_T$
- $1 \le T \le 10^5$
- $1 \le X_i \le 10^{11} \ \ (1 \le i \le T)$
- All input values are integers.
Output
Print $T$ lines.
On the $i$-th line, print the smallest positive integer $Y_i$ satisfying the conditions for $X_i$.
Sample
Sample 1
Input
6 1 2 3 4 5 6
Output
2 6 6 12 10 24
For example, the positive divisors of $6$ are the $4$ integers $1, 2, 3, 6$. The positive multiples of $6$ are, in ascending order, $6, 12, 18, 24, 30, \dots$, and their numbers of positive divisors are $4, 6, 6, 8, 8, \dots$, respectively. Therefore, the smallest integer satisfying the conditions is $24$.
Sample 2
Input
3 2021 1058400 100000000000
Output
4042 11642400 300000000000
The input and output values may not fit in a 32-bit integer.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
tatyam