|
|
вернуться в форум[n/m]==[n/(m+1)] maybe the problem can be abstracted as the following one: n,m are integers, n given, find the smallest m such that [n/m]==[n/(m+1)] holds, where [] denotes the floor() function. well, anyone has any ideas? Re: [n/m]==[n/(m+1)] Yes, it's redefinition of problem. Re: [n/m]==[n/(m+1)] but how can i find such an m? a binary search does seems not to work... Re: [n/m]==[n/(m+1)] The binary search works. But it isn't a binary search by the answer. ;) Re: [n/m]==[n/(m+1)] I use binary search of answer in range Sqrt(n) and Sqrt(n) + Sqrt(Sqrt(n)) |
|
|