Tuesday, 17 May 2011

113-power of criptography

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main()
{
    long double p,k;int n;
    //freopen("in.txt","r",stdin);
    while(scanf("%ld%Lf",&n,&p)==2)
    {
        k=exp(log(p)/n);
        printf("%.Lf\n",k);//if 2.51=3;if 2.15=2
    }
    return(0);
}

No comments:

Post a Comment