Mock CCC '24 Contest 1 J1 - Lemon Bathtub

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 512M

Problem type

Driven by his passion for all things lemony, Tommy yearns to transform his bathing ritual into a citrus-infused delight. However, a setback looms as his beloved bathtub spout succumbs to disrepair. Unfazed by this challenge, Tommy ingeniously orchestrates a solution—utilizing a hose to transport water from his garden to the lemon-scented sanctuary of his bathtub. The bathtub has a capacity of L litres and the hose dispenses K litres of water per minute. Please determine how long it will take for Tommy to fill his bathtub so he can luxuriate in his lemon-infused haven.

Input Specification

The input will consist of two lines. The first line will contain an integer L \ (1 \leq L \leq 10^9), representing the amount of water that the bathtub can hold. The second line will contain an integer K \ (1 \leq K \leq L), representing the amount of water that the hose dispenses per minute. It is guaranteed that K divides L.

Output Specification

The output will consist of a single integer T, the number of minutes it will take Tommy to fill his bathtub.

Sample Input 1


Sample Output 1


Explanation for Sample 1

Since Tommy's hose fills 2\frac{\texttt{L}}{\texttt{minute}}, it will fill his 6\texttt{L} bathtub in 3 minutes.

Sample Input 2


Sample Output 2



There are no comments at the moment.