Codeforces Round 1083 (Div. 2)
B
Simons and Cakes for Success
Codeforces
800
原题
← AC →
翻译中…

When I succeed, we'll share the cakes together!— SHUN

翻译中…

Simons has $n$ friends and a huge amount of cakes. To divide the cakes fairly, you are asked to help him solve the following problem:

翻译中…
  • Find the minimum positive integer $k$ such that $n$ is a divisor of $k^n$.
翻译中…

It can be proved that the answer always exists under the given constraints.

翻译中…

Input

翻译中…

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 100$). The description of the test cases follows.

翻译中…

The only line of each test case contains a single integer $n$ ($2\le n\le 10^9$) — the number of friends Simons has.

翻译中…

Output

翻译中…

For each test case, output a single integer — the minimum $k$ you found.

翻译中…

Note

翻译中…

In the first test case:

翻译中…
  • $1^8=1$, and $8$ is not a divisor of $1$;
  • $2^8=256$, and $8$ is a divisor of $256$, because $256 = 8\cdot 32$.
翻译中…

Thus, the minimum possible $k$ is $2$.

翻译中…

In the second test case, $12$ is a divisor of $6^{12}=2\,176\,782\,336$, because $2\,176\,782\,336=12\cdot 181\,398\,528$.

翻译中…

样例

Input #1
4
8
12
369
55635800
Output #1
2
6
123
2090
InputCopy OutputCopy
题目信息
题号
2205B
时间限制
1 s
内存限制
256 MB
标签
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。