The Girlfriend and Magical Shop
CodeChefOpen on judge ↗
After starting working on Magical Shop, $Ayush$ has to attend too many customers. Moreover, he has a girlfriend who pings him every $N$ minutes (N, 2N, 3N..). The Magical Shop (being so cheap!) has customers arrived every $M$ minutes (M,2M,3M..). So, every time he gets a message and a customer at the same time, he $refuses$ to attend the customer (GF always is a priority!). As you alre
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