fork(1) download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. /*
  5. http://w...content-available-to-author-only...d.com/forum_thread.php?id=895&nowrap=true#8728
  6. */
  7.  
  8. int main(void) {
  9. int k,b,n;
  10. double log_n,score;
  11. const double digit_score=1.50733E+17;
  12. scanf("%d%d%d",&k,&b,&n);
  13. log_n=log(k)+n*log(b);
  14. score=log_n*log_n*log_n*log(log_n)/digit_score;
  15. printf("score of %d*%d^%d+/-1 is %f\n",k,b,n,score);
  16. return 0;
  17. }
Success #stdin #stdout 0s 1792KB
stdin
7668057255 2 666667
stdout
score of 2147483647*2^666667+/-1 is 8.539890