問題一覧 > 通常問題

No.1611 Minimum Multiple with Double Divisors

レベル : / AI推定難易度 : 1650 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 135
作問者 : ygussany / テスター : tatyam nebocco
お気に入りにしたユーザー ProblemId : 6379 / 自分の提出
問題文最終更新日: 2021-07-21 18:18:41
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 305 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。