Circumference of a Circle
InterviewTime limit1sMemory limit128 MB
For each line of three non-collinear points, compute the perimeter of the circle passing through them, rounded to two decimals.
- Level
Easy3 of 10
- Topics
- Geometry, Math, Implementation, Brute force
- Solved
- No attempts yet
Problem
You are given three points that do not lie on a single straight line. Write a program that computes the circumference (perimeter) of the circle passing through all three points (its circumscribed circle).
Input
The input consists of several test cases. Each test case is a single line containing six real numbers separated by spaces, giving the coordinates of the three points. Input continues until end of file (EOF). The diameter of the circle formed by the three points does not exceed 1,000,000.
Output
For each test case, print the circumference of the circle through the three points, rounded to two decimal places (rounding at the third decimal place). Use as the approximation of .