Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- long long np(double n,double x)
- {
- double p;
- double xx=x;
- p=(double)round((double)pow(double(xx),double(1/n)));
- p=round(p);
- return p;
- }
- long long nroot(int n,long long x)
- {
- if(x<0)
- x=-x;
- x=np(n,x);
- return x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement