Free Candies For Everyone!
CodeChefOpen on judge ↗
There is a special offer in Ankur’s local grocery store: if the customer buys $a$ candies, he or she may take $b$ additional candies for free. This special offer can be used infinite number of times. Ankur currently has $s$ rupees, and he wants to get as many candies for free. Each candy costs $c$ rupees. Help Ankur to calculate the maximum possible number of candies he can get! Input The 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