重点是返回较大的数吧? int max(int a ,int b){ return (a+b)/2+abs(a-b)/2 } 转载于:https://www.cnblogs.com/chaizp/p/5313287.html