求助
查看原帖
求助
1093564
leave_for楼主2023/10/14 00:38

不会出现TLE,代码如下:

#include<iostream>
using namespace std;
int main()
{
    float s=0;
    short ans=1;
    cin>>s;
    for(double i=2;i<s;i+=(i*0.98)){ans++;}
    cout<<ans<<endl;
    return 0;
}

只有一个测试点过了,怎么回事
谢谢解答!

2023/10/14 00:38
加载中...