← All problemsSign in

Tour Plan

CodeChefRating 170Open on judge ↗

Chef is going on a roadtrip, and is trying to figure out how much it will cost him. His cab operator gives him the following rates: - A fixed cost of $X$ rupees that will cover up to $50$ kilometers, and - Every kilometer past the $50$-th has a cost of $Y$ rupees per kilometer. Chef's destination is $Z$ kilometers away. How much will he need to pay? ### Input - The only line of input will conta

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