简单的模拟一下,以0.00001秒的速度前进
#include <stdio.h>
#include <bits/stdc++.h>
#define read(); freopen("input.txt","r",stdin);
using namespace std;
int main()
{
double l=0,r=1000,frid=0;int t=0,k=1;
while(r-l>1){
if(frid>=r){
k=-1;t++;frid=r-(frid-r);
}
if(frid<=l){
k=1;frid=l+(l-frid);
}
l+=0.00001*10;r-=0.00001*10;frid+=0.00001*50*k;
}
cout<<t<<endl;
return 0;
}