The point on the interval
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The segment is given by the coordinates of its endpoints: M(x[1]
,y[1]
) and N(x[2]
,y[2]
). Find the coordinates of O(x,y), which divides it in ratio α.
Input
In a single line the coordinates of segment endpoints and the number α are given. All coordinates do not exceed 100 by the absolute value.
Output
Print in one line the coordinates x and y of the desired point with two digits after the decimal point.
Examples
Input #1
Answer #1
Submissions 8K
Acceptance rate 48%