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;
}




 

posted @ 2014-08-12 15:11  颜威  阅读(99)  评论(0编辑  收藏  举报