#include<bits/stdc++.h>
using namespace std;

#ifndef ONLINE_JUDGE
  #include "Mohit.h"
#endif

typedef long long ll;
typedef long double ld;
#define endl '\n'
#define rep(i,n)  for(ll i = 0; i < (n); ++i)
#define repA(i, a, n)  for(ll i = a; i <= (n); ++i)
#define repD(i, a, n)  for(ll i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define ff first
#define ss second
#define pb push_back
typedef vector<ll> vll;
typedef vector<pair<ll,ll>> vpl;
const ld PI = 4*atan((ld)1);
const ll INF = 1e18;
const ll mod = 1e9+7;

int main()
{
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    ll tt=1;
        cin >> tt;
    repA(qq,1,tt){
        ll n; cin >> n;
        vll a(n);
        rep(i,n){
            cin >> a[i];
        }

        ll ans = INF;
        ll s1=a[0],s2=0,c1=1,c2=0;
        ll m1=a[0],m2=INF;

        repA(i,1,n-1){
            if(i&1){
                m2 = min(m2,a[i]); s2 += a[i];
                ll t1 = (s2-m2)+(n-(c2))*m2;
                ll t2 = (s1-m1)+(n-(c1-1))*m1;
                ans = min(ans,t1+t2);
                c2++;
            }else{
                m1 = min(m1,a[i]); s1 += a[i];
                ll t1 = (s1-m1)+(n-(c1))*m1;
                ll t2 = (s2-m2)+(n-(c2-1))*m2;
                ans = min(ans,t1+t2);
                c1++;
            }
        }

        cout << ans << endl;
    }
}
