← All problemsSign in

Party Mystery

It's Tejasi's birthday and her mom has prepared hot dogs. There are N hot dogs and M people and her mom wants to divide the hotdogs equally. Tejasi wants to calulate the minimum number of cuts required to distribute the hot dogs equally. Help Tejasi in finding out the number of cuts required. In order to divide the hot dogs, the number of cuts splitting individual hot dogs must be as small as po

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