uva 113 Power of Cryptography

https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid;=8&page;=show_problem&problem;=49 题意:求p开n次方。保证结果为整数。 思路:p最大10的101次方。。。double最大10的308次方。。因为肯定是整数。。不存在精度问题。。所以可以用douible水过QAQ…

 1/* ***********************************************
 2Author :111qqz
 3Created Time :2016年01月28日 星期四 03时07分01秒
 4File Name :code/uva/113.cpp
 5************************************************ */
 6
 7#include <cstdio>
 8#include <cstring>
 9#include <iostream>
10#include <algorithm>
11#include <vector>
12#include <queue>
13#include <set>
14#include <map>
15#include <string>
16#include <cmath>
17#include <cstdlib>
18#include <ctime>
19#define fst first
20#define sec second
21#define lson l,m,rt<<1
22#define rson m+1,r,rt<<1|1
23#define ms(a,x) memset(a,x,sizeof(a))
24typedef long long LL;
25#define pi pair < int ,int >
26#define MP make_pair
27
28using namespace std;
29const double eps = 1E-8;
30const int dx4[4]={1,0,0,-1};
31const int dy4[4]={0,-1,1,0};
32const int inf = 0x3f3f3f3f;
33double n,p;
34int main()
35{
36	#ifndef  ONLINE_JUDGE 
37	freopen("code/in.txt","r",stdin);
38  #endif
39
40	while (scanf("%lf %lf",&n,&p)!=EOF)
41	{
42	    printf("%.f\n",pow(p,1.0/n));
43	}
44
45  #ifndef ONLINE_JUDGE  
46  fclose(stdin);
47  #endif
48    return 0;
49}