← All problemsSign in

Candy Store

CodeChefRating 429Open on judge ↗

Chef has started working at the candy store. The store has $100$ chocolates in total. Chef’s daily goal is to sell $X$ chocolates. For each chocolate sold, he will get $1$ rupee. However, if Chef exceeds his daily goal, he gets $2$ rupees per chocolate for each **extra** chocolate. If Chef sells $Y$ chocolates in a day, find the total amount he made. ### Input - The first line of input will co

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