← All problemsSign in

MCL PHASE 1 CHALLENGE 203

You have a number A. You want to check whether a can be converted to the number B. To convert, you can do some operations. They are: Increment the number by p. Decrement the number by m. You can do any of the two operations any number of times. You have to find whether it is possible to convert A to B using these operations. ###Input: First Line contains a single integer, T, the n

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start