0

I have the following question: In a store I want to pay with exactly 50 coins. There are 2€, 1€, 0,5€ 0,2€ and 0,1€ coins. So I'd have 2a + 1b + 0,5c + 0,2d + 0,1*e = amount I have to pay And a+b+c+d+e=50 (number of coins) Since there are no half Euros, a,b,c,d, and e are natural numbers (0-50)

Is there any way to solve this? Thanks in advance

8t3ph
  • 1

1 Answers1

0

It depends on the amount you want to pay. For example, if the amount is $0.01$, you do not have a coin with that "resolution". Moreover, if the amount you want to pay is $0.1$, you can only pay with your $0.1$ coin, because you don't have any coins with lower value to combine. Finally, there are amounts you do not have the money for: if something costs $\$1000000$, you don't have a coin with a high enough value such that fifty of it will give you a million dollars. In summary, with the information you have given us, it seems that the problem is underspecified.

Sam
  • 1,013
  • The amount I want to pay is about 63,x0. – 8t3ph Dec 05 '20 at 18:57
  • How much exactly? 63.001 is unsolvable, for example. – Sam Dec 05 '20 at 19:07
  • No, I know 63.001 is unsolvable because there isn't a 0.001€ coin. Assuming I want to pay all in coins in a real store only using coins but it should be 50 coins exactly. – 8t3ph Dec 05 '20 at 20:30