eolymp
bolt
Try our new interface for solving problems
Problems

Power of Cryptography

Power of Cryptography

\includegraphics{https://static.e-olymp.com/content/c6/c633e8cda11e14a9b403bd12d428bd9be8c3be2c.jpg} Given an integer \textbf{n} ≥ \textbf{1} and an integer \textbf{p} ≥ \textbf{1} you are to write a program that determines , the positive \textbf{n}-th root of \textbf{p}. There always exists such integer \textbf{k} that \textbf{k^n}^\{ \}= \textbf{p}. \InputFile Consists of two numbers \textbf{n} and \textbf{p} (\textbf{1} ≤ \textbf{n} ≤ \textbf{300}, \textbf{1} ≤ \textbf{p} ≤ \textbf{10^100}). It is known that there always exists an integer \textbf{k} (\textbf{1} ≤ \textbf{k} ≤ \textbf{10^9}) such that \textbf{k^n} = \textbf{p}. \OutputFile \includegraphics{https://static.e-olymp.com/content/c6/c633e8cda11e14a9b403bd12d428bd9be8c3be2c.jpg} Print the value , i.e. the number \textbf{k} such that \textbf{k^n} = \textbf{p}.
Time limit 1 second
Memory limit 122.17 MiB
Input example #1
2 16
Output example #1
4
Input example #2
3 27
Output example #2
3
Input example #3
7 4357186184021382204544
Output example #3
1234