#C5838. Marathon Time Calculation
Marathon Time Calculation
Marathon Time Calculation
You are given two lists: the first list contains the lengths of different sections of a marathon, and the second list contains the corresponding speeds (in km/h) for each section. For each section, you are required to calculate the time required to complete that section. The time is computed using the formula:
\(time_i = \lceil \frac{length_i}{speed_i} \rceil\)
where \(\lceil x \rceil\) denotes the ceiling of \(x\). The result should be output as a sequence of space-separated integers.
Note: The input will be provided via standard input (stdin) and the output must be written to standard output (stdout).
inputFormat
The input consists of three lines:
- The first line contains an integer \(n\), which is the number of sections in the marathon.
- The second line contains \(n\) space-separated integers representing the lengths of each section.
- The third line contains \(n\) space-separated integers representing the speeds corresponding to each section.
outputFormat
Output a single line containing \(n\) space-separated integers. Each integer represents the time (in hours) required to complete that section, computed as \(\lceil \frac{length_i}{speed_i} \rceil\).
## sample3
3 6 9
1 2 3
3 3 3