#include <iostream>
using namespace std;
#define ll long long int 
#include<bits/stdc++.h>
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define f first
#define s second
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define rep(n) for(ll i=0;i<n;i++)
#define repa(a,n) for(ll i=a;i<=n;i++)
#define rrep(n) for(ll i=n-1;i>=0;i--)
#define rrepa(n,a) for(ll i=n;i>=a;i--)
#define tt ll t ;cin>>t;ll pp=t;while(t--)
#define mod 1000000007
#define SIZE 2000000
ll parent[1000009];
ll bit[1000009]; 

int main(){
    IOS
    tt
    {
      ll n;
      cin>>n;
      ll c[n+1];
      rep(n)cin>>c[i];
      ll anss=c[0]*n+c[1]*n;
      ll j=0;
      ll k=1;
      ll mi1=c[0];
      ll mi2=c[1];
      ll sum1=c[0];
      ll sum2=c[1];
      repa(2,n-1)
      {
          if(i%2==0)
          { 
              sum1+=c[i];
              if(c[i]<mi1)
              {
                  mi1=c[i];
                  j=i;
              }
          }
          else
          {   sum2+=c[i];
              if(c[i]<mi2)
              {
                  mi2=c[i];
                  k=i;
              }
          }
          ll ans;
          if(i%2==0)
           ans=sum1+sum2+c[j]*(n-i/2-1)+c[k]*(n-i/2);
          else
          ans=sum1+sum2+c[j]*(n-i/2-1)+c[k]*(n-i/2-1);
          
       anss=min(ans,anss);
      }
      cout<<anss<<"\n";
    
    }
    return 0;
}