Water
CodeChefOpen on judge ↗
A town in Death Valley has a water tank that contains 100,000 litres of water. Water is consumed by the town at the rate of X litres per week. If it is assumed that there is no rain, your job is to find the total number of weeks water will last. Do not include the last week if the water remaining for that week is less than the weekly usage amount. Input The first line of the input contains 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