大佬帮帮忙,我的代码WA了两个,不知道错那
#include<bits/stdc++.h>
using namespace std;
long double r,x,y;
int ans;
int main(){
cin>>r>>x>>y;
int l=0;
while(l<=r){
++ans;
double mid=(l+r)/2;
if(mid<=y&&mid>=x){
cout<<ans;
return 0;
}
if(mid<x) l=mid+1;
else r=mid-1;
}
return 0;
}