#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
const int MX=100007;
vector<int> prime;
void SoE(){
    bool vis[MX];
    memset(vis, 1, sizeof(vis));
    vis[0]=vis[1]=0;
    for(int i=2; i*i<MX; i++){
        if(vis[i]){
            prime.pb(i);
            for(int j=i*i; j<MX; j+=i)
                vis[j]=0;
        }
    }
}
int main(){
    int TC;
    cin >> TC;
    for(int xyz=1; xyz<=TC; xyz++){
        int N;
        cin >> N;
        ll ans=1e16, gan=N, gen=N, C[N], tmp;
        pll smol=mp(1000000007, 1000000007), smo[N];
        for(int i=0; i<N; i++){
            cin >> C[i];
            if(i&1){
                smol.fi=min(smol.fi, C[i]);
            }else{
                smol.se=min(smol.se, C[i]);
            }
            smo[i]=smol;
        }
        ll tot=C[0];
        gen--;
        for(int i=1; i<N; i++){
            if(i&1)
                gan--;
            else
                gen--;
            tot+=C[i];
            tmp=tot+gan*smo[i].fi+gen*smo[i].se;
            ans=min(ans, tmp);
        }
        cout << ans << endl;
    }
}

