(SOLVED) Code in Python pleasee
Discipline: IT, Web
Type of Paper: Question-Answer
Academic Level: Undergrad. (yrs 3-4)
Paper Format: APA
Code in Python pleasee
TTBank has gift cards, and they come in three different denominations: $10, $30, and $50. Jugg has collected a lot of them!
Jugg would like to use N cards to buy an item, which costs M dollars. However, he doesn't want to leave a remaining balance on any cards he chooses.
How many different ways is Jugg able to buy the item?
The first line contains two integers N, M. N is the number of cards, and M is the cost of that item.
An integer, representing the number of different ways to buy the item, using the exact number of cards required.
Jugg must use 4 cards to buy an $80 item.
There are 2 ways to do this:
2 $10 gift cards and 2 $30 gift cards. (10+10+30+30=80)
3 $10 gift cards and 1 $50 gift card. (10+10+10+50=80)