#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;

const ll Maxll=2e18;

inline ll rd(void)
{
    int ans=0;
    char ch=getchar();
    while(ch>'9'||ch<'0') ch=getchar();
    while(ch>='0'&&ch<='9')
    {
        ans*=10;
        ans+=ch-'0';
        ch=getchar();
    }
    return ans;
}

ll c,cmin[2][100005],s[2][100005];

int main()
{
    int t;
    for(cin>>t; t>0; t--)
    {
        int n=rd();
        ll ans=Maxll;
        s[1][0]=s[2][0]=0;
        for(int i=1; i<=n; i++)
        {
            c=rd();
            if((i+1)/2==1) cmin[i%2][1]=c;
            else
            {
                if (c<cmin[i%2][(i-1)/2]) cmin[i%2][(i+1)/2]=c;
                else cmin[i%2][(i+1)/2]=cmin[i%2][(i-1)/2];
            }
            s[i%2][(i+1)/2]=s[i%2][(i-1)/2]+c;
            //cout<<"cmin="<<cmin[i%2][(i+1)/2]<<"   s="<<s[i%2][(i+1)/2]<<endl;
        }
        for(int i=1; i<=n/2; i++)
        {
            ll posb=0;
            for(int j=0; j<=1; j++)
                posb+=s[j][i]+cmin[j][i]*(n-i);
            if(posb<ans) ans=posb;
            if(2*i+1<=n)
            {
                posb=0;
                posb+=s[0][i]+cmin[0][i]*(n-i);
                posb+=s[1][i+1]+cmin[1][i+1]*(n-i-1);
                if(posb<ans) ans=posb;
            }
        }
        cout<<ans<<endl;
    }
}
