// yukicoder: No.105 arcの六角ボルト // 2019.7.26 bal4u #include #include #define EPS 1e-10 #define ZERO(x) (fabs(x)<=EPS) #define MAGIC 57.295779513082320876798154814105 // 180/Pi int main() { int i, f, T; double x, y, a, ans; scanf("%d", &T); while (T--) { ans = 90.0, f = 1; for (i = 0; i < 6; i++) { scanf("%lf%lf", &x, &y); if (f && x > 0 && (ZERO(y) || y >= 0)) { if (ZERO(y)) f = 0; else { a = atan2(y, x) * MAGIC; if (a < ans) ans = a; } } } if (f) printf("%.12lf\n", ans); else puts("0.000000000000"); } return 0; }