134k views
1 vote
Pixel goes shopping with one hundred dollars and ends up buying three different types of items: A, B, and C. The unit price of A is five dollars, B is 25 cents, and C is five cents. Pixel comes home and finds that all the money had been spent, but discovers that the total number of items is exactly equal to100. How many items of each kind did Pixel buy? No fractions allowed. (Spend exactly 100 dollars and buy a total of 100 items)

User Louisth
by
4.0k points

1 Answer

5 votes

Answer:

  • A - 16, B - 79, C - 5

Explanation:

Given

  • A costs 5$
  • B costs $0.25
  • C costs $0.05
  • A + B + C = 100
  • 5A + 0.25B + 0.05C = 100 ⇒ 100A + 5B + C = 2000

Subtract the first equation from the second:

  • 99A + 4B = 1900

We have a restriction in numbers:

  • 0 < A, B, C < 100

Since 4B can be max 400, we get 99A > 1500 and 99A < 1900 so:

  • A > 1500/99 > 15

and

  • A < 1900/99 < 19

A can be 16 or 18 as it should be even number to get B the whole number.

If A = 16:

  • 99*16 + 4B = 1900
  • 4B = 1900 - 1584
  • 4B = 316
  • B = 316/4 = 79

If A = 18:

  • 99*18 + 4B = 1900
  • 4B = 1900 - 1782
  • 4B = 118
  • B = 118/4 = 29.5, discarded as decimal

So we get:

  • A = 16, B = 79 and C = 100 - (16 + 79) = 5

Let's proof the numbers:

  • 16*5 + 79*0.25 + 5*0.05 = 100, confirmed

User Jabal Logian
by
4.1k points