Drummer (Small)

Given integer strike times, find the smallest maximum deviation from any arithmetic progression and print it as a reduced fraction.

Medium7MathBrute forceNo attempts yetTime limit5sMemory limit512 MB

Problem

The drummer keeps the rhythm for the band. If the rhythm wobbles, the whole performance falls apart.

You are the lead singer of a popular rock band, and you have a problem. Your drummer just quit to become a professional video gamer, so you need a new one right away. There is no shortage of candidates. Your job is to pick the one who keeps the steadiest rhythm.

Each candidate auditions alone. During the audition the candidate strikes a single drum several times. In a perfect rhythm the gap between consecutive strikes is always the same, so the strike times form an arithmetic progression T0, T0+K, T0+2K, , T0+(N1)KT_0,\ T_0+K,\ T_0+2K,\ \dots,\ T_0+(N-1)K, where T0T_0 and KK are real numbers.

No human plays a perfect rhythm. A candidate plays with error EE when there are T0T_0 and KK such that Ti(T0+iK)E|T_i - (T_0 + iK)| \le E for every ii, with the strikes numbered from 0.

Given the strike times of a candidate, find the smallest error EE over all perfect rhythms the candidate could have been aiming at.

Input

The first line has the number of test cases TT. Each of the next test cases takes two lines and describes the audition of one candidate. The first line has the number of strikes NN. The second line has the NN strike times in milliseconds, given as integers separated by spaces in increasing order.

Limits

  • 1T1001 \le T \le 100
  • 2N102 \le N \le 10
  • 0Ti1000 \le T_i \le 100
  • Ti<Ti+1T_i < T_{i+1}

Output

For each test case print one line in the form Case #x: E, where xx is the test case number starting from 1 and EE is the smallest possible error.

EE is always a rational number, so print it as an irreducible fraction. Write E=p/qE = p/q with p0p \ge 0, q1q \ge 1 and gcd(p,q)=1\gcd(p, q) = 1, then print p/q, or print only p when qq is 1. Print 0 for an error of zero and 3/4 for an error of three quarters.