Open xuesanshi opened 5 years ago
假如前四个数字数字刚刚好,那是不是要把middle换一下? if(count > (middle - start + 1)) end = middle; else start = middle + 1; 应该改为 if(count > (middle - start + 1)) end = middle; else start = middle + 1; middle= end ;
为什么要换呢?已经结束本次循环进行下一循环了呀。
假如前四个数字数字刚刚好,那是不是要把middle换一下?
if(count > (middle - start + 1)) end = middle; else start = middle + 1; 应该改为 if(count > (middle - start + 1)) end = middle; else start = middle + 1; middle= end ;