Source: https://www.bissoy.com/720699/
For Rs. 0.5 you get 1 Cherry.
For Rs.3 you get 1 Orange.
For Rs.5 you get 1 Watermelon.
Your mother told you to get 100 fruits for Rs.100.
Condition: You have to get at least one of each fruit.
(And please tell me how to answer such riddles)
Answer
There is two solutions for your problem.
84c, 11o, 5w
or88c, 2o, 10w
How do we come up with these answers. It's a simple math problem + little logic. First we create these two equations that represents our problem:
$x+y+z = 100$ and ($0.5x+3y+5z = 100$ or $x+6y+10z=200$ (for simplicity))
Isolate $x$ for $x+y+z=100$ => $x=100-y-z$ Substitute $x=100-y-z$ => $100-y-z+6y+10z=200$
Isolate $y$ for $100-y-z+6y+10z=200$ => $y=(-9z+100)/5$
Now:
For $x=100-y-z$
Substitute $y=(-9z+100)/5 - z$ => $x=4z/5 + 80$
So the solution of the system of equations are:
$y=(-9z+100)/5$ and $x=4z/5 + 80$
So all what is left to do is to
Find $z$ where $y$ and $x$ are both positive and natural numbers.
Looking at $x$, $z$ need to be a multiplier of 5 to get a natural number, so we test it with 5,10,15,etc...
When we test the 15, $y$ becomes negative. So the only solutions are that $z$ is equal to 5 and 10.
Again, your problem has two solutions:84c, 11o, 5w
or88c, 2o, 10w
No comments:
Post a Comment