Aditya and Chocolates
CodeChefOpen on judge ↗
A chocolate company came up with an offer for their 100 years anniversary. They have introduced two new chocolate packets. The first pack contains $1000 chocolates$ and costs $₹ 500$ and the other pack of $5 chocolates$ costs $₹ 5$. (These are the only packs sold by the company) Aditya has $X$ rupees. Help Aditya to find the maximum number of chocolates he can buy with the available money. ##
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