`
249326109
  • 浏览: 53626 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

uva 113 - Power of Cryptography

    博客分类:
  • acm
 
阅读更多

本以为可能要大数计算,网上看了下貌似double就够了。

 

/*
 * uva113.cpp
 *
 *  Created on: 2013-4-16
 *      Author: kevinjiang
 */
#include <cstdio>
#include <cmath>

int main() {
    double n, p;

    while (scanf("%lf%lf", &n, &p) != EOF) {
        printf("%.lf\n", pow(p, 1/n));
    }

    return 0;
}

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics