← All problemsSign in

Movie

CodeChefRating 576Open on judge ↗

Chef and his friends are going to watch a movie. He will buy $N$ movie tickets and $M$ buckets of popcorn for him and his friends. The price of a movie ticket is $A$ rupees, and the price of a bucket of popcorn is $B$ rupees. However, there is a special offer for a combo pack of $1$ movie ticket and $1$ bucket of popcorn for $C$ rupees. It is guaranteed that $\max(A, B) < C \le A + B$, i.e. the

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