Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- before, now = map(int, (input("Nhập chỉ số điện tháng trước và tháng này: ").split()))
- num = now - before
- temp = num
- cash = 0
- if (num > 400):
- temp -= 400
- cash += temp*2701
- temp = num - temp
- if (num > 300):
- temp -= 300
- cash += temp*2615
- temp = num - temp
- if (num > 200):
- temp -= 200
- cash += temp*2340
- temp = num - temp
- if (num > 100):
- temp -= 100
- cash += temp*1858
- temp = num - temp
- if (num > 50):
- temp -= 50
- cash += temp*1600
- temp = num - temp
- if (num <= 50):
- cash += temp*1549
- cash *= 1.1
- print("Số tiền điện phải trả: {}".format(cash))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement