Help me to find number of solution of this equation efficiently

Revision en1, by abcsumits, 2023-08-15 05:43:10

I have to find min value of [a/x]+[b/x]+x-1 ,where x belongs to (1,10^9) ,here [] denotes ceil value. I then observed it is monotonic in nature. Its graph will be like

The only problem i am having is to find slope(from slope i meant if every step is assumed as points ,this will help me to shift l and r) and slope can be find by use of its previous neighbour points to find neighbour of y=f(x),we need to find length of y so for given y=[a/x]+[b/x]+x-1 i need the range of the solution

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English abcsumits 2023-08-15 05:43:10 637 Initial revision (published)