/*Author: Barish Namazov*/
#include <bits/stdc++.h>
using namespace std;
/*TEMPLATE*/
#define INF 1000000010
#define intt long long
#define forn(i,a,b) for(intt i=a;i<=b;i++)
#define rofn(i,a,b) for(intt i=a;i>=b;i--)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define VI vector<intt>
#define PII pair<intt,intt>
#define VPII vector< PII >
#define sqr(n) n*n
#define IO ios_base::sync_with_stdio(false);cin.tie();
intt powmod(intt a,intt b,intt mod){intt res=1;a%=mod;assert(b>=0);for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
intt gcd(intt a,intt b){if(!b)return a;return (b,a%b);}
intt lcm(intt a,intt b){return a*b/gcd(a,b);}
intt is_prime(intt n){if(n==2)return 1;forn(i,2,n)if(!n%i)return 0;return 1;}
/*ENDS HERE*/
int main () {
IO;
intt T;
scanf("%lld", &T);
for (int i = 1; i <= T; i++) {
intt n;
double ans = 0, elem, comb = 0;
scanf("%lld", &n);
for (int j = 0; j <n; j++) {
scanf("%lf", &elem);
double tmp = log2(fabs(elem));
if (j!=0) {
comb += log2(double(n-j)/j);
tmp += comb;
}
if (elem>=0)
ans += pow(2, tmp - n + 1);
else
ans -= pow(2, tmp - n + 1);
}
printf("Case #%d: %.3lf\n", i, ans);
}
return 0;
}
LypBdXRob3I6IEJhcmlzaCBOYW1hem92Ki8KI2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgovKlRFTVBMQVRFKi8KI2RlZmluZSBJTkYgMTAwMDAwMDAxMAojZGVmaW5lIGludHQgbG9uZyBsb25nCiNkZWZpbmUgZm9ybihpLGEsYikgZm9yKGludHQgaT1hO2k8PWI7aSsrKQojZGVmaW5lIHJvZm4oaSxhLGIpIGZvcihpbnR0IGk9YTtpPj1iO2ktLSkKI2RlZmluZSBmaSBmaXJzdAojZGVmaW5lIHNlIHNlY29uZAojZGVmaW5lIHBiIHB1c2hfYmFjawojZGVmaW5lIG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KICAgICAgICAgICAgICAgIHRtcCArPSBjb21iOwogICAgICAgICAgICB9CgogICAgICAgICAgICBpZiAoZWxlbT49MCkKICAgICAgICAgICAgICAgIGFucyArPSBwb3coMiwgdG1wIC0gbiArIDEpOwogICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgICBhbnMgLT0gcG93KDIsIHRtcCAtIG4gKyAxKTsKICAgICAgICB9CgogICAgICAgIHByaW50ZigiQ2FzZSAjJWQ6ICUuM2xmXG4iLCBpLCAgYW5zKTsKICAgIH0KICAgIHJldHVybiAwOwp9