用1元、2元、5元硬币凑出10元,且硬币总数不超过5枚。以下程序计算符合要求的组合个数,横线处应填写的代码是?
python复制1count = 0 2for one in range(0, 11): 3 for two in range(0, 6): 4 for five in range(0, 3): 5 total_money = one + two * 2 + five * 5 6 total_coins = one + two + five 7 if ________: 8 count += 1 9print(count)
1count = 0 2for one in range(0, 11): 3 for two in range(0, 6): 4 for five in range(0, 3): 5 total_money = one + two * 2 + five * 5 6 total_coins = one + two + five 7 if ________: 8 count += 1 9print(count)
total_money == 10
total_coins <= 5
total_money == 10 and total_coins <= 5
total_money == 10 and total_coins >= 5