“Sometimes it is the people no one can imagine anything of who do the things no one can imagine.” ― Sir Alan Turing


ADS

ADS

Saturday, April 8, 2017

UVa 113 Power of Cryptography Solution in C / C++


Source Code

#include<stdio.h>

#include<math.h>

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

No comments:

Post a Comment