← All problemsSign in

Covaxin vs Covishield

CodeChefRating 2899Open on judge ↗

There are two types of vaccines available: Covaxin and Covishield. A black marketeer has $X$ coins and wants to buy as many vaccines as possible. Due to the black marketing concerns, government has enforced the following policy: - $i^{th}$ dose of Covaxin costs $a + (i - 1)\cdot b$ coins for every $i \geq 1$. - $i^{th}$ dose of Covishield costs $c + (i - 1)\cdot d$ coins for every $i \geq 1$.

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