40分Python求助

P1422 小玉家的电费

你再仔细检查一遍
by hjx100825 @ 2022-02-03 22:36:33


看下我的↓ ~~~~ a = int(input()) b = 150 * 0.4463 c = 250 * 0.4663 if a <= 150: print(round(a * 0.4463, 1)) elif a > 150 and a <= 400: print(round(b + (a - 150) * 0.4663, 1)) else: print(round(b + c + (a - 400) * 0.5663, 1)) ~~~~
by ronkeyson @ 2022-06-22 21:44:25


可以用b和c两个变量存起来更容易查找出BUG
by ronkeyson @ 2022-06-22 21:45:07


|