求助
查看原帖
求助
1160345
great_mad楼主2023/11/4 20:49
#include <stdio.h>
int main()
{
    int s;
    scanf("%d",&s);
    int bu=s-2;//bu为与目标相差的距离
    int t=1;//t为步数
    
    while(bu<=0)
    {
        bu=s-bu*0.98;
        t++;
    }
    printf("%d",t);
    return 0;
}
2023/11/4 20:49
加载中...