Movies and snacks
CodeChefOpen on judge ↗
A person gets 2000 rupees for movies and snacks in a month. If he can't spend more than x on snacks in a month. Also, the price of movies decreases by 10 percent every week and he spends 20 percent of a movie ticket on snacks every time he watches a movie. Write a program to calculate the maximum number of movies he can watch and the amount of money he saved at the end of the month. Take x an
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