现在的位置: 首页 > 综合 > 正文

POJ2109 Power of Cryptography(easy!)

2018年12月19日 ⁄ 综合 ⁄ 共 172字 ⁄ 字号 评论关闭

http://poj.org/problem?id=2109


ans^n = p。

给出n,p。求ans。


#include <iostream>
#include <cmath>
using namespace std;

int main() {
    double n, p;
    while(cin>>n>>p) {
        cout<<pow(p, 1.0/n)<<endl;
    }
    return 0;
}

抱歉!评论已关闭.