摘要: int divide(int dividend, int divisor) { //除数不能为零, 防止溢出(4bits: 0到7 和 -8到-1, -8除以 -1 = 8 溢出) if(divisor == 0 || (dividend == INT_MIN && divisor == -1)) return INT_MAX; i... 阅读全文