Puzzle for Software Engineers!! #puzzle #softwareengineer

preview_player
Показать описание
Solution: To find the contaminated Jar, follow this step-wise approach.

Step 1: Take out 1 pill from jar 1, 2 pills from jar 2, 3 pills from jar 3, 4 pills from jar 4 and 5 pills from jar 5.
Step 2: Put all these 15 pills on the scale. The correct weight is 150 (15*10). But one of the jars has contaminated pills. So the weight will definitely be less than 150.
Step 3: If the weight is 149 then jar 1 has contaminated pills because there is only one contaminated pill. If the weight is 148 then jar 2, if the weight is 147 then jar 3, if 146 then jar 4, if 145 then jar 5.
Рекомендации по теме
Комментарии
Автор

Step1:-label all the jars as jar 1, jar 2 etc
Step2:-take out one pill from jar 1, two pill from jar two, three pills from jar three, four pill from jar four and five pill from jar five
Step3:-suppose if all pills are heavy then the expected weight will be (1+2+3+4+5)*10=150grams
Step4:- Actual weight with one jar containing lighter pills:
• If one jar contains lighter pills (9 grams each), the total weight will be less than 150 grams.
• If Jar 1 has lighter pills, the total weight will be 150 - 1 \times (10 - 9) = 149 gm
• If Jar 2 has lighter pills, the total weight will be 150 - 2 \times (10 - 9) = 148 gm
• If Jar 3 has lighter pills, the total weight will be 150 - 3 \times (10 - 9) = 147 gm
• If Jar 4 has lighter pills, the total weight will be 150 - 4 \times (10 - 9) = 146 gm
• If Jar 5 has lighter pills, the total weight will be 150 - 5 \times (10 - 9) = 145 gm
5. Determine the lighter jar:
• Weigh the pills once. Depending on the weight you get (149g, 148g, 147g, 146g, or 145g), you can determine which jar contains the lighter pills.

For example:

• If the weight is 149 grams, Jar 1 has the lighter pills.
• If the weight is 148 grams, Jar 2 has the lighter pills, and so on.

Shubhimix
Автор

Like har ek jar m 5 pills hai to each jar have 150g weight except 9g pills jar so put all tha jars together on weighting machine and total weight is 150*4+145 so put one by one jar and Wight low according to put out jar and less 145 g Weight so you can say this jar have 9g pills

rajatvarshney
Автор

Sir pls meri baat ka jawab de dijiye pls
My question is main electrical engineering se b tech kar raha hun aur mujhe software engineer mein interest hai kya main electrical engineering branch se b tech karke software Engineer ke field mein job kar sakta hun
Eligible hoke jaise coding and programming sab kar sakta hun pls reply me pls sir

GovindMishra-id
Автор

Ma sir pahale 9 gm nikal lunga jo khali hogi bo hi ha odd one

OnceMORE