QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 2048 MB Points totaux : 100

#6566. 约数的幂

Statistiques

考虑一个正整数 $n$。令 $f(n)$ 为 $n$ 的正整数约数的个数。例如,若 $n = 8$,则 $f(n) = 4$,因为 8 的约数有 1, 2, 4 和 8。

现在,考虑一个正整数 $x$。求满足 $n^{f(n)} = x$ 的最小正整数 $n$。

输入格式

输入包含一行,为一个整数 $x$ ($1 \le x \le 10^{18}$),即上述题目中的 $x$。

输出格式

输出一个整数,表示满足 $n^{f(n)} = x$ 的最小正整数 $n$;如果不存在这样的 $n$,则输出 $-1$。

样例

样例输入 1

15625

样例输出 1

25

样例输入 2

64000000

样例输出 2

20

样例输入 3

65536

样例输出 3

-1

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.