Accepted
/in/foo.c: In function 'main': /in/foo.c:8:11: warning: unused variable 'm' [-Wunused-variable] float m, r; ^
代码
#include <stdio.h>
#include <math.h>
int
main(void)
{
//m = (log(p/(p-d*r))/log(1+r)
float m, r;
int d, p;
scanf("%d %d %f", &d, &p, &r);
printf("%.2f", (log10(p/(p-d*r)))/log10(1+r));
return 0;
}