“=” 粗心了

目的是 tot = (tot - num + debt[i])

一不小心就写成这样了:

tot -=  num + debt[i];

应该是这样的:

tot = tot - num + debt[i];

代码可是看了很久,才找到错误的,细节决定成败啊;纪念下!!!   

原文地址:https://www.cnblogs.com/submarinex/p/1941260.html