← All problemsSign in

Leave Together

Mac.Rose has n friends they have semester break which starts from the k$^\text{th}$ day of the week. Mac.Rose lives nearby so there is a bus daily to his hometown (but it is not the same for all his friends). They all decided to leave on same day. i$^\text{th}$ friend has bus to his hometown at every a$_\text{i}$ day from the k$^\text{th}$ day. **Tell the earliest day on which all can leave toge

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