代码都有优化的空间,不喜勿喷~ 1.二分法: public int numberofprize (int a, int b, int c) { // write code here int left=min(a,b,c); int right=max(a,b,c); while (left<=right){ int mid=left+(right-left)/2; if (check(mid,a,b,c)){ left=mid+1; ...