TRICKY BALLS
CodeChefOpen on judge ↗
Krishna Murthy is one of the top businessmen in London. He is known for his intelligent and witty tricks. In one of his favourite games: He gives his opponent two similar looking golf balls one made of gold and the other made of silver, he also asks the opponent a number N to assess his intelligence while he challenges him to pick a ball. He has a hidden logic behind the selection process which
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