Weird Shopkeeper
CodeChefOpen on judge ↗
In an imaginary country there is a shopkeeper whose shop has only one item. The initial cost of that item is C. The shopkeeper follows the following approach to change the price of that product. a) For the first 3 days, he increases the price of the item by a value of 1, everyday b) For the next 3 days, he decreases the price by a value of 2, everyday c) For the next 3 days, he increases price
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