Gamestation
CodeChefOpen on judge ↗
Daman and Keshav are fond of eating Samosas. They came across an Eating Tournament in their locality and decided to participate in it as a two-member team. In order to win they need to finish $N$ Samosas. Daman and Keshav can eat a Samosa in $X$ and $Y$ seconds respectively. One Samosa cannot be shared between them. $\\$ Find out the minimum time required to finish $N$ Samosas. ### Input - First
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