Problem: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=24&problem=49&mosmsg=Submission+received+with+ID+18722967
Code:
#include<bits/stdc++.h>
using namespace std;
int main()
{
double a,b;
while(cin>>a>>b)
{
//cout<<b<<a<<endl;
//cout<<<<endl;
printf("%.0lf\n",pow(b,1/a));
}
return 0;
}
Code:
#include<bits/stdc++.h>
using namespace std;
int main()
{
double a,b;
while(cin>>a>>b)
{
//cout<<b<<a<<endl;
//cout<<<<endl;
printf("%.0lf\n",pow(b,1/a));
}
return 0;
}
No comments:
Post a Comment