eolymp
bolt
Try our new interface for solving problems
Məsələlər

Regular Convex Polygon

Regular Convex Polygon

A regular convex polygon is a polygon where each side has the same length, and all interior angles are equal and less than \textbf{180} degrees. A square, for example, is a regular convex polygon. You are given three points which are vertices of a regular convex polygon \textbf{R}; can you determine the minimum number of vertices that \textbf{R} must have? \InputFile Each test case consists of three lines. Line \textbf{i} consists of two floating point values \textbf{x_i} and \textbf{y_i} (\textbf{-10^4} ≤ \textbf{x_i}, \textbf{y_i} ≤ \textbf{10^4}) where (\textbf{x_i}, \textbf{y_i}) are the coordinates of a vertex of \textbf{R}. The coordinates are given with a precision of \textbf{10^\{-6\}}, i.e., they di ffer from the exact coordinates by at most \textbf{10^\{-6\}}. You may assume that for each test case the Euclidean distance between any two given points is at least \textbf{1}, and \textbf{R} has at most \textbf{1000} vertices. The input will finish with a line containing the word \textbf{END}. \OutputFile For each test case, print one line with the minimum number of vertices that \textbf{R} must have.
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
-1385.736326 -146.954822
430.000292 -2041.361203
1162.736034 478.316025
0.000000 4147.000000
-4147.000000 0.000000
0.000000 -4147.000000
END
Çıxış verilənləri #1
3
4