MrX and the chocolates
CodeChefOpen on judge ↗
Problem description. Mr.X goes to the supermarket to buy chocolates. There he observes chocolates kept on two racks A and B along with the cost written on them. He decides to buy the chocolates on the following condition: He will buy both the chocolates(one from rack A and other from rack B) if the prices printed on both of them are not co-prime. Since he is very fond of chocolates but a little w
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