#C1177. Plant Height Calculation
Plant Height Calculation
Plant Height Calculation
You are given n plants. For each plant, you are provided with its initial height, its daily growth rate, and a number of days. The height of a plant after a given number of days is calculated using the formula:
\( H = H_0 + r \times d \)
where \( H_0 \) is the initial height, \( r \) is the growth rate per day, and \( d \) is the number of days.
Your task is to compute the final height of each plant after the specified days.
inputFormat
The input is given from standard input and has the following format:
n initial_height_1 initial_height_2 ... initial_height_n growth_rate_1 growth_rate_2 ... growth_rate_n day_1 day_2 ... day_n
Where:
n
is the number of plants.- The second line contains
n
integers representing the initial heights of the plants. - The third line contains
n
integers representing the daily growth rates of the plants. - The fourth line contains
n
integers representing the number of days.
outputFormat
Print to standard output a single line with n
integers separated by spaces. Each integer is the height of the corresponding plant after the specified number of days, computed using the formula:
\( H = H_0 + r \times d \)
## sample3
10 15 20
2 1 3
5 10 15
20 25 65