#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ln cout<<"\n"
using namespace std;
#define rep(i,s,n) for(ll i = (s);i<(n);++i)
#define pc(x) __builtin_popcount(x)
void DBG() {
	cerr << "]" << endl;
}
template<class H, class... T> void DBG(H h, T... t) {
    //cerr << '[' << endl;
	cerr << to_string(h);
	if(sizeof...(t))
		cerr << ", ";
	DBG(t...);
}
#ifdef _DEBUG
#define dbg(...) cerr << "LINE(" << __LINE__ << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
#else
#define dbg(...) {}
#endif

#define pi pair<int,int>
#define pl pair<ll,ll> 
#define fr first
#define sc second
#define pb push_back

void solve(){

    int n;
    cin >> n;
    vector<ll> even,odd;
    even.pb(0);odd.pb(0);
    rep(i,1,n+1){
        int a;
        cin >> a;
        i&1?odd.pb(a):even.pb(a);
    }    
    ll em = 1e18,om = 1e18,ans = 1e18,es = 0,os = 0;
    // bool b1 = 0,b2 = 1;
    rep(k,2,n+1){
        int p = k/2,q = k - p;
        es += even[p];
        em = min(em,even[p]);
        os += odd[q];
        om = min(om,odd[q]);
        if(k&1)es -= even[p];
        if(k > 2 && k%2 == 0)os -= odd[q];
        // dbg(p,q,es,os,em,om);
        ans = min(ans,os + es + om*(n-q) + em*(n-p));
    }
    cout << ans;ln;

}


int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL); 
    //gen_factorial(1e6);   
    int test=1;
    cin>>test;   
    while(test--)
        solve();
    return 0;
}