diff --git a/case_00/sub_2.py b/case_00/sub_2.py index 9fd16a7..c437cfb 100644 --- a/case_00/sub_2.py +++ b/case_00/sub_2.py @@ -13,10 +13,11 @@ pro = float(input('净利润(万元):')) fit = 0 - +fit2=0 for i in range(1, len(arr)): if (pro > arr[i]): fit += (arr[i] - arr[i - 1]) * (rat[i] / 100) + fit=fit2+(pro-100)*(1/100) else: fit += (pro - arr[i - 1]) * (rat[i] / 100) break