CF2205B.Simons and Cakes for Success

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Simons and Cakes for Success

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

Simons has nn 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 kk such that nn is a divisor of knk^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 tt (1t1001 \le t \le 100). The description of the test cases follows.

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

Output

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

Note

In the first test case:

  • 18=11^8=1, and 88 is not a divisor of 11;
  • 28=2562^8=256, and 88 is a divisor of 256256, because 256=832256 = 8\cdot 32.

Thus, the minimum possible kk is 22.

In the second test case, 1212 is a divisor of 612=21767823366^{12}=2\,176\,782\,336, because 2176782336=121813985282\,176\,782\,336=12\cdot 181\,398\,528.

Samples

4
8
12
369
55635800
2
6
123
2090

在线编程 IDE

建议全屏模式获得最佳体验