Coin Count

There are some coins made up with $ 1 \$1 , $ 5 \$5 , and $ 10 \$10 , but there are some following restrictions:

  • $ 1 \$1 , $ 5 \$5 , and $ 10 \$10 coins must have 1 at least.
  • The maximum of total amount is 30.

How many ways to make $ 99 \$99 with these restrictions?


The answer is 28.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Vincent Huang
Jun 6, 2021

Let x x , y y , and z z as the amount of $ 1 \$1 , $ 5 \$5 , and $ 10 \$10 coins. Then make the equations:

{ x + 5 y + 10 z = 99 3 x + y + z 30 \begin{cases} x+5y+10z=99\\ 3\leq x+y+z\leq 30\\ \end{cases}

From x x that it has 4 possible values: 4 4 , 9 9 , 14 14 , and 19 19 . Then make cases to solve:

x y z t 4 2 t 1 10 t 1 t 9 9 2 t 9 t 1 t 8 14 2 t 1 9 t 1 t 8 19 2 t 8 t 1 t 3 \begin{array}{|c|c|c|c|} \hline x & y & z& t\\ \hline 4 & 2t-1 & 10-t & 1\leq t\leq 9\\ \hline 9 & 2t & 9-t & 1\leq t\leq 8\\ \hline 14 & 2t-1 & 9-t & 1\leq t\leq 8\\ \hline 19 & 2t & 8-t & 1\leq t\leq 3\\ \hline \end{array}

Combine the result, so there are 28 \boxed{28} ways to make $ 99 \$99 .

Hosam Hajjir
Jun 10, 2021

I used the following code to find the number of ways.

count = 0

For i = 1 To 30

For j = 1 To 20

For k = 1 To 10

If i + j + k <= 30 And i + 5 * j + 10 * k = 99 Then count = count + 1

Next k

Next j

Next i

MsgBox (count)

' Output : 28

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...