UVA 113-Power of Cryptography
题目大意:给n和p,求出k,使得k^n=p
解题思路:用pow()函数
#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
double a, b;
while(scanf("%lf%lf", &a, &b) != EOF)
printf("%.0lf\n", pow(b ,1 / a));
return 0;
}

本文介绍了UVA113-PowerofCryptography问题的解决方法,该问题是给定n和p,求解k使k^n=p成立。通过使用pow()函数实现了解题算法。

372

被折叠的 条评论
为什么被折叠?



