#include #include #include using namespace std; typedef long long LL; const int N=20; LL w[N]; LL ans,n; LL get(LL x) { return x==0? 0:get(x-(x&-x))+1; } void dfs(LL beg,LL num,LL sym) { ans+=((LL)1<>t; while(t--) { cin>>n; for(i=1;i<=n;i++) cin>>w[i]; ans=0; for(i=1;i<=n;i++) dfs(i,w[i],1); cout<<"Case #"<