题目
分析
- 求 p√n .
思路
pow().
代码
#include <stdio.h>
#include <math.h>
int main(void)
{
double n, p;
while(scanf("%lf%lf", &n, &p) != EOF)
printf("%.0lf\n", pow(p, 1/n));
return 0;
}
本文介绍了一种在密码学中常见的数学运算——求幂次方根。通过使用C语言中的pow()函数,演示了如何计算任意正整数p的n次方根。此运算在密码学领域有着广泛的应用。
pow().#include <stdio.h>
#include <math.h>
int main(void)
{
double n, p;
while(scanf("%lf%lf", &n, &p) != EOF)
printf("%.0lf\n", pow(p, 1/n));
return 0;
}

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