아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Power of Divisors

시간 제한1초메모리 제한2048 MB

요약
x가 10^18 이하로 주어질 때 n^f(n) = x를 만족하는 가장 작은 n을 구하거나, 없으면 -1을 출력한다. 여기서 f(n)은 n의 약수 개수다.
난이도

보통10점 중 6점

유형
정수론, 완전 탐색, 수학
정답자
아직 제출이 없습니다

문제

Consider a positive integer nn. Let f(n)f(n) be the number of positive integer divisors of nn. For example, if n=8n=8 then f(n)=4f(n)=4, since the divisors of 88 are 11, 22, 44 and 88.

Now, consider a positive integer xx. What is the smallest value of nn such that nf(n)=xn^{f(n)}=x?

입력

The single line of input contains a single integer xx (1≤x≤10181 \le x \le 10^{18}). This is the xx of the statement above.

출력

Output a single integer, which is the smallest value of nn such that nf(n)=xn^{f(n)}=x, or −1-1 if no such value of nn exists.

예제3

  1. 예제 1

    입력
    15625
    
    예상 출력
    25
    
  2. 예제 2

    입력
    64000000
    
    예상 출력
    20
    
  3. 예제 3

    입력
    65536
    
    예상 출력
    -1