1 0 0 coins made up of pennies ($0.01), dimes ($0.10) and quarters ($0.25) to be worth exactly $5?
Is it possible to have exactly
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.
Could you explain how do you get the 'p+10d+25q=500' equation?
Log in to reply
$0.01 = 1 penny
$0.10 = 1 dime
$0.25 = 1 quarter
Let p , d and q be the number of pennies, dimes and quarters respectively. Therefore,
0 . 0 1 p + 0 . 1 d + 0 . 2 5 q = 5 1 0 0 p + 1 0 d + 4 q = 5 ∴ p + 1 0 d + 2 5 q = 5 0 0
Log in to reply
ah, i see, thanks!
x + 1 0 y + 2 5 ( 1 0 0 − x − y ) = 5 0 0
2 0 0 0 = 2 4 x + 1 5 y = 3 ( 8 x + 5 y )
for x and y to be integers then 2000 must be divisible by 3 which is wrong therefore, no combination is possible.
1 2 3 4 5 6 |
|
This has no output, so there are no successes. If you change the amount to $5.05, there are three such instances. By the way, the language is Python.
x , y , z are pennies, dimes, and quarters respectively. Where x , y , and z are integers.
Let's evaluate two information in the problem:
(1) The number of coins are 100. So, x + y + z = 1 0 0
(2) Total value of the coins are $5. So, 0 . 0 1 x + 0 . 1 0 y + 0 . 2 5 z = 5
We can also write both equations like this:
(1) x + y + z = 1 0 0
(2) x + 1 0 y + 2 5 z = 5 0 0
Subtract (2) with (1), we will get:
9 y + 2 4 z = 4 0 0
Now, divide both sides with 3 and we get:
3 y + 8 z = 3 4 0 0
If y and z are integers, it is impossible that 3 y + 8 y equals a fraction. Therefore we conclude that the system of equations has no solution.
Let x be number of coins of pennies
y be number of coins of dimes
z be number of coins of dimes
as
0.01x+0.10y+0.25z=5.00..............................(1)
x+y+z=100..................................................(2)
Multiply (1) by 100 on both sides
x+10y+25z=500................................................(3)
x+y+z=100..................................................(2)
take z on left side
x+10y=500-25z..................................(4)
x+y=100-z........................................(5)
Solve (4) and (5)
get x in terms of z only
x=(100-3z)/3
z can have values from 0 to 20 [from (3) we can find this range, put x=0, y=0, z=500/25=20]
100-3z can be never be a Multiple of 3 for any value of z in [0,20]
So the answer is NO
Problem Loading...
Note Loading...
Set Loading...
Let the there be p pennies, d dimes and q quarters. So
p + d + q = 1 0 0 p + 1 0 d + 2 5 q = 5 0 0
On subtracting the first equation from the second one, we get
9 d + 2 4 q = 4 0 0
3 ∣ 9 q and 3 ∣ 2 4 q so 3 must also divide 4 0 0 if any integral values of d and q exist. But we see that 3 ∤ 4 0 0 . So no integral solutions of d and q exist.
Note
a ∣ b means a divides b or in other words, a n = b for some integer n . Examples: 3 ∣ 6 and 7 ∣ 2 1 .
If a ∣ b and a ∣ c , then a ∣ ( b + c )