eolymp
bolt
Try our new interface for solving problems
Məsələlər

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}.
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 122.17 MiB
Giriş verilənləri #1
2 16
Çıxış verilənləri #1
4
Giriş verilənləri #2
3 27
Çıxış verilənləri #2
3
Giriş verilənləri #3
7 4357186184021382204544
Çıxış verilənləri #3
1234