Alien at SANDHAAN
CodeChefOpen on judge ↗
Today is an event named SANDHAAN in BIT sindri and an alien is chasing after two students named Dinka and Sunshine. Dinka screams at times p, p + x, p + 2 x, b + 3 x, ... and Sunshine screams at times q, q + y, q + 2 y, q + 3 y, .... The Monster will catch them if at any point they scream at the same time. Input - The first line contains two integers x and p (1 ≤ x , p ≤ 100). - The second
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