import sequtils,algorithm,math,strutils template times*(n:int,body) = (for _ in 0..", varargs.} proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc printf(formatstr: cstring){.header: "", varargs.} proc scan(): int = while true: let k = getchar_unlocked() if k < '0': return result = 10 * result + k.ord - '0'.ord proc printFloat(f:float) = if f < 1e-8: printf("0.0\n") else: printf("%f\n", f) scan().times: discard getchar_unlocked() var x,y:float var xMin = 500.0 var yMin : float for i in 0..<6: scanf("%lf %lf\n",addr x,addr y) if x < xMin : xMin = x yMin = y const toRad = 1.0 / PI * 180.0 let tMin = -(arctan2(xMin,yMin) * toRad + 30.0) mod 59.9999999999 printFloat(tMin)