UVa-113-Power of Cryptography
AOAPC I: Beginning Algorithm Contests (Rujia Liu) :: Volume 1. Elementary Problem Solving :: Maths - Misc
// 113 - Power of Cryptography #include <iostream> #include <cmath> using namespace std; int main(void) { double n, p; while(cin >> n >> p) cout << (int)(pow(p, 1.0/n)+0.5) << endl; return 0; }