Chocolate Multiplier
CodeChefOpen on judge ↗
A mall has N chocolate multiplier machine numbered as 1, 2, 3, . . . N . Each machine has a multiplier number associated with it. Ai is the multiplier for the ith machine. If one chocolate is put into machine i, then it produces Ai chocolates. Now, Rob has X chocolates but his friend wants exactly Y chocolates on his birthday. Help Rob to guess if he can obtain exactly Y chocolates from X chocolat
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