Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- coin1 = int(input())
- coin2 = int(input())
- note5 = int(input())
- amount = int(input())
- for c1 in range(0, coin1 + 1):
- for c2 in range(0, coin2 + 1):
- for n5 in range(0, note5 + 1):
- if amount == (n5 * 5 + c2 * 2 + c1 * 1):
- print(f'{c1} * 1 lv. + {c2} * 2 lv. + {n5} * 5 lv. = {amount} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement