/ 科创班 /

记录详情

Accepted

/in/foo.c: In function 'main':
/in/foo.c:8:11: warning: unused variable 'm' [-Wunused-variable]
     float m, r;
           ^
# 状态 耗时 内存占用
#1 Accepted 1ms 184.0 KiB
#2 Accepted 1ms 204.0 KiB
#3 Accepted 1ms 188.0 KiB
#4 Accepted 1ms 188.0 KiB
#5 Accepted 0ms 204.0 KiB
#6 Accepted 1ms 188.0 KiB
#7 Accepted 1ms 188.0 KiB
#8 Accepted 1ms 208.0 KiB
#9 Accepted 1ms 188.0 KiB
#10 Accepted 1ms 188.0 KiB

代码

#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;
}

信息

递交者
类型
递交
题目
3.3还贷问题
题目数据
下载
语言
C
递交时间
2018-10-26 00:26:02
评测时间
2018-10-26 00:26:02
评测机
分数
100
总耗时
11ms
峰值内存
208.0 KiB