我今天才发现的。。。 a+1=-~a a-1=~-a 因为-是按位取反再加一,~是按位取反,所以就实现了。。。好机智呀。。。 转载于:https://www.cnblogs.com/chxer/p/4638008.html