python的 b / a 会向下取整, 比如 -1 / 132 = -1。 题目要求是取整数部分,那么负数的时候,实际应该是向上取整, 解决方法: int(b / float(a))
b / a
int(b / float(a))