善用pow()函式來解題。
C++(0.012)
/*******************************************************/
/* UVa 113 Power of Cryptography */
/* Author: Maplewing [at] knightzone.studio */
/* Version: 2012/03/14 */
/*******************************************************/
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
double n, p, k;
while( scanf( "%lf%lf", &n, &p ) != EOF )
printf( "%.0lf\n", pow( p, 1.0/n ) );
return 0;
}