cryptography(密码学)
#include<iostream> #include<cstdio> #include<cmath> using namespace std; int main() { double x,y;//calculate y^(1/x) int k; while(scanf("%lf%lf",&x,&y)!=EOF)//double型输入用 %lf { //pow函数的参数原型都是double型的 //实数a^b四舍五入取整的方法: //double a,b; int num=(int)(pow(a,b)+0.5); k=(int)(pow(y,1.0/x)+0.5);//四舍五入的功效! printf("%d\n",k); } return 0; }
Reference:
https://cn.vjudge.net/contest/319360#problem/A