P4780 Inverse Function of Phi.
Description
Find the smallest positive integer $x$ such that $\varphi(x)=n$.
Input Format
Input a positive integer $n$ ($n
Output Format
Output $x$. If $x>2^{31}$ or it does not exist, output $-1$.
Explanation/Hint
Translated by ChatGPT 5