///                          BISMILLA HIRRAHMANIR RAHIM
///                              ALLAH IS ALMIGHTY
///                          ALLAH IS MUCH MORE CREATIVE

#include<bits/stdc++.h>
#define faster  ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define pb              push_back
#define ff              first
#define ss              second
#define mem(a,v)        memset(a, v, sizeof(a))
#define all(a)          (a).begin(), (a).end()
#define rep(i,n)        for(int i = 0; i < (n); ++i)
#define pq              priority_queue<ll, vector<ll>, greater<ll>>
using namespace std;
using ll =                   int64_t;
using ii=                    pair<ll,ll>;
const double PI =            acos(-1.0);
const int mx =               2e5+5;
const int M=                 1e9+7;


int dr[]= {0,-1,0,1,-1,-1,1,1};  /// first 4 are right,up,left,bottom
int dc[]= {1,0,-1,0,1,-1,-1,1};
int kx[]= {-1,-2,-2,-1,1,2,2,1};  /// knight move
int ky[]= {2,1,-1,-2,-2,-1,1,2};

bool valid(int row,int col){
    return (row>=1) && (row<=8) && (col>=1) && (col<=8);
}


void Solve()
{
   ll i,j,x,y,z,sum=0,ans=0,n,m=0,k,l=0,p;
   cin>>n; ll a[mx];
   rep(i,n) cin>>a[i];

   ll sum1= a[0];
   ll sum2= a[1];
   ans= a[0]*n+ a[1]*n;
   multiset<ll>m1,m2;

m1.insert(a[0]);
m2.insert(a[1]);

   for(i=2; i<n; i++){
     if(i%2) {
        m2.insert(a[i]);
        sum2+= a[i];
     }
    else {
        m1.insert(a[i]);
        sum1+= a[i];
    }

    l= *m1.begin();   /// take small element;
    k= *m2.begin();

    x= m1.size();
    y= m2.size();

    ll rem1= n-x;
    ll rem2= n-y;

    ll tot= 0;
    tot+= sum1+ (rem1*l) + sum2+ (rem2*k);   ///sum1= sob element ek bar kore nibo means coto element o ekbar nici;
    ans= min(ans,tot);                       /// (rem1*l) means coto element ek bar sum1 er moddy nici baki bar ei khane nici
   }                                         /// https://www.youtube.com/watch?v=cbvh3o8Im3o&t=293s
   cout << ans<< "\n";
}

int main()
{
    faster;

   int TC;
   ll jj=1;
    cin >> TC;

    while(TC--) {
         Solve();
    }

    return 0;
}


