Mid=(s+e)>>1, what does that means?

In the function why do you use mid=(s+e)>>1 instead of mid=(s+e)/2

It means the same thing. >> 1 means dividing by 2^1

//square root #include<bits/stdc++.h> using namespace std; float sqr(int n,int p) { float ans=-1; int s=0,e=n; while(s<=e) { int mid=(s+e)/2; if((midmid)==n){ return mid; } if((midmid)<n) { ans=mid; s=mid+1; } else { e=mid-1; } } float inc=0.1; for(int i=1;i<=p;i++) { while((ans*ans)<=n) { ans=ans+inc; inc=inc+0.1; } ans=ans-inc; inc=inc/10; } return ans; } int main() { int n,p; float ans; cin>>n>>p; ans=sqr(n,p); cout<<ans; return 0; }

this is the same program but it is not passing test cases why?

Save your code on ide.codingblocks.com and then share its link.
Also mention the question name