The Confused Weighing Machine
CodeChefOpen on judge ↗
A mint has got N coin producing machines (numbered from 1 to N). All machines are supposed to produce coins of weight A. But, there is one faulty machine which produces coins of weight B. Write a program to find out which machine is faulty with the help of a weighing machine. The weighing machine cannot handle more than S coins at a time. Your program has to determine which coin producing machin
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start