rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Problem Solution 113: Power of Cryptography

Welcome Note

Hi,
I'm Anisuzzaman Babla . I am a full stack Android Application Developer. I am working with Android for more than two years. I have completed my graduation from IIT, Jahangirnagar University. I have developed a series of commercially successful apps on Android. Moreover, 10+ of my Apps are live at Google play store. .
Thank You

UVa Problem Solution 113: Power of Cryptography

    #include<stdio.h>
    #include<math.h>
    int main(){
    double n,p;
    while(scanf("%lf%lf",&n,&p)==2){
    printf("%.0lf\n",pow(p,1/n));
    } return 0;
    }

6 comments:

  1. scanf("%lf%lf",&n,&p)==2
    vai ei lineta kano use korlen??

    r "%.0lf\n",pow(p,1/n) ei line e .01f dia ki bujhai??

    ReplyDelete
  2. scanf("%lf%lf",&n,&p) is used for inputting 2 double no.
    while & ==2 are used for inputting one more time.
    .0lf means 0 digit after decimal. .0lf is used for avoiding digit after decimal. As we need integer nnumber we set the precision 0.

    ReplyDelete
  3. vai, problem statement a to input r range onek boro. pow function kivabe ato boro data hisab korlo. p r value to 64 bit r chey onek boro.

    ReplyDelete
  4. pow function er ki kono limit ase naki? @Abir

    ReplyDelete
  5. #include
    #include

    int main()
    {
    double n,p;
    while(scanf("%lf%lf",&n,&p)==2)
    {
    printf("%.0lf\n",pow(p,1/n));
    }
    return 0;
    }

    _____________________________________________

    ei code ta C++ e likhte gele printf er vitore kivabe likhbo "%.03" term ta..
    erokom likhle to ase na
    cin>>n>>p;
    cout<<pow(p,1/n);

    ReplyDelete
  6. Follow these link
    http://en.cppreference.com/w/cpp/io/manip/setprecision
    http://www.cplusplus.com/forum/beginner/105302/

    ReplyDelete