Question 127819
I used h for hundreds,  f for five hundreds, and s for singles.


So {{{h+f+s=500}}}.


Hundreds are worth $100, so the value of the h hundreds is {{{100h}}}, likewise the value of the f five hundreds is {{{500f}}}, and the value of the s singles is just {{{s}}}, and we know that:


{{{100h+500f+s=50000}}}



But now what?  We have three unknowns but only two equations.


The secret lies in realizing that the answers must be positive integers.


Let's rearrange the equations a little:


{{{h+s=500-f}}}


{{{100h+s=50000-500f}}}


Now multiply the first equation by -1:
{{{-h-s=-500+f}}}


And add it term-by-term to the second equation:
{{{99h=49500-499f}}}


Then divide by 99:
{{{h=(49500-499f)/99}}}


Now we know that the smallest f can be is 0 and the largest it could be is 100, because {{{500*100=50000}}}.  We can actually exclude 100 because that gets us to 50,000 with only 100 bills.


The problem now becomes finding a whole number value for f so that the expression for h above comes out to be another whole number.  You could make a list of all the results of {{{(49500-499f)/99}}} for each of the 100 possibilities for f, but that is a lot of calculator work.  If you have access to MS Excel, you can solve it the way I did.  I made a list of the numbers from 1 to 100, made a formula that calculated {{{(49500-499f)/99}}} for each of those numbers, and examined the list for an integer result.


There is an analysis method, but it is a bit convoluted.  First thing to notice is that {{{49500/99=500}}}, an integer, therefore we only need to find f so that {{{499f/99}}} is an integer.  Well, right from the start we can see that {{{f=0}}} is a possibility, but I think we can exclude that result because the wording of the problem at least implies that he has at least one of each kind of bill.

Now notice that, in the case of {{{f=1}}}, the remainder using integer division of {{{499/99}}} is 4.  That means the remainder when {{{f=2}}} will be 8, and so on until you get to {{{f=24}}} where the remainder is 96.  The next one, {{{f=25}}}, the remainder reverts to 1 {{{96+4-99=1}}}, and the 'by 4' count starts over.  {{{f=49}}} has a remainder of 97, {{{f=50}}} => {{{r=2}}}, {{{f=74}}} => {{{r=98}}}, {{{f=75}}} => {{{r=3}}}, {{{f=98}}} => {{{r=95}}},  {{{f=99}}} => {{{r=0}}}!!!!  And we have found the answer.


Turns out there is only one integer result, excluding the trivial result of h = 500, f = 0, and s = 0, and that is:  h = 1, f = 99, and s = 400.