poj 2109 Power of Cryptography
这个题用double就能过;
View Code
#include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<cmath> #include<queue> #include<set> #include<map> #include<vector> using namespace std; int main( ) { double k,p; while( scanf( "%lf %lf",&k,&p )==2 ) { printf( "%.0f\n",pow( p,1.0/k ) ); } //system( "pause" ); return 0; }