The distance from the point to the segment
Easy
Execution time limit is 1 second
Runtime memory usage limit is 256 megabytes
Given a segment in space (x_1, y_1, z_1) - (x_2, y_2, z_2) and the point (x, y, z). Find the distance from the point to the segment.
Input
Given integers x_1, y_1, z_1, x_2, y_2, z_2, x, y, z. Coordinates do not exceed 1000.
Output
Bring out the desired quantity c up at least 6 digits after the decimal point.
Examples
Input #1
Answer #1
Submissions 698
Acceptance rate 21%