3 types of people go to a marriage party.
Type 1 people : 1 man eats in 4 plates.
Type 2 people : 1 man eats in 2 plates.
Type 3 people : 4 men eat in 1 plate.
You are given that exactly 100 people go to the party and there are exactly 100 plates. So you have to calculate how many people of type 1, type 2 and type 3 will go to the party. Whereby the condition is all the 100 plates should be consumed by 100 people. And no plate will remaining after the party.
Let no. of plates consumed by people of type 1 are x, type 2 are y, and type 3 are z.
=> x + y + z = 100 ….(1)
So no. of plates consumed by type 1 are 4x, type 2 are 2y, and type 3 are z.
=> x/4 + y/2 + 4z = 100 ….(2)
( x will be the multiple of 4 and y will be the multiple of 2 because the no. of plates will be an Integer value)
By solving these two equations we get :-
=> 14z – x = 200 ….(3)
Now you have to manually find all value of x, and z from eq.(3) by considering their conditions
1) 15 < = z <= 24 (because eq.(3)) minimum no. of z will be 15 because if we take 14 then eq(3) will not satisfied, and maximum no. of z will be 24 because if we take 24 plates then 96 people and if take 25 plates then 100 people which is not possible because type 1 and type 2 are also exist there and z belongs to I.
2) 1 <= x <= 97 and will be the multiple of 4, x belongs to I.
3) 1 <= y <= 95 and will be the multiple of 2, y belongs to I.
And put the value of x, z in eq(1) and find y. If condition satisfied then it will be our final result.
This article is contributed by Harshit Agrawal. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Puzzle 1 | (How to Measure 45 minutes using two identical wires?)
- Puzzle 2 | (Find ages of daughters)
- Puzzle 3 | (Calculate total distance travelled by bee)
- Puzzle 4 | (Pay an employee using a 7 units gold rod?)
- Puzzle 13 | (100 Prisoners with Red/Black Hats)
- Puzzle 5 | (Finding the poisoned wine)
- Puzzle 6 | (Monty Hall problem)
- Puzzle 7 | (3 Bulbs and 3 Switches)
- Puzzle 8 | (Find the Jar with contaminated pills)
- Puzzle 9 | (Find the fastest 3 horses)
- Puzzle 10 | (A Man with Medical Condition and 2 Pills)
- Puzzle 11 | (1000 Coins and 10 Bags)
- Puzzle 12 | (Maximize probability of White Ball)
- Puzzle 14 | (Strategy for a 2 Player Coin Game)
- Puzzle 15 | (Camel and Banana Puzzle)