Accepted
代码
#include <stdio.h>
#include <math.h>
int main()
{
float d,p,r,m;
scanf("%f%f%f",&d,&p,&r);
m=log10(p/(p-d*r))/log10(1+r);
printf("%6.2f\n",m);
return 0;
}
#include <stdio.h>
#include <math.h>
int main()
{
float d,p,r,m;
scanf("%f%f%f",&d,&p,&r);
m=log10(p/(p-d*r))/log10(1+r);
printf("%6.2f\n",m);
return 0;
}