// KNOW NOTHING!
#include <bits/stdc++.h>
#define ll long long int
#define F(i,j,k,in) for(int i=j;i<k;i+=in)
#define DF(i,j,k,in) for(int i=j;i>=k;i-=in)
#define feach(it,l) for (auto it = l.begin(); it != l.end(); ++it)
#define fall(a) a.begin(),a.end()
#define sz(x) (int)x.size()
#define szs(x) (int)x.length()
#define pb push_back
#define ub upper_bound
#define lb lower_bound
#define eq equal_range
#define fs first
#define ss second
#define ins insert
#define mkp make_pair
#define endl "\n"
using namespace std;
typedef vector<ll> vll;
typedef vector<int> vin;
typedef vector<char> vch;
typedef vector<string> vst;
typedef set<ll> sll;
typedef set<int> sint;
typedef set<char> sch;
typedef set<string> sst;
typedef queue<ll> qll;
typedef queue<int> qin;
typedef deque<ll> dqll;
typedef deque<int> dqint;
typedef priority_queue<ll> pqll;
typedef priority_queue<int> pqin;
typedef map<ll,ll> mpll;
typedef map<int,int> mpin;
typedef pair<ll,ll> pll;
typedef pair<int,int> pin;
const ll MOD=1000000007;
const long double PI=3.1415926535897932384626433832795;
ll pwr(ll b,ll p){ll res=1;while(p){if(p&1) {res*=b; p--;}else{b*=b; p>>=1;}}return res;}
ll mpwr(ll b,ll p){ll res=1;while(p){if(p&1) {res=(res*b)%MOD; p--;}else{b=(b*b)%MOD; p>>=1;}}return res;}
int msb (int n) {return 31-__builtin_clz(n);}
ll msbl (ll n) {return 63-__builtin_clzll(n);}
int lsb (int n) {return __builtin_ctz(n);}
ll  lsbl (ll n) {return __builtin_ctzll(n);}
int setbit (int n) {return __builtin_popcount(n);}
ll setbitl (ll n) {return __builtin_popcountll(n);}
int main()
{
/*
freopen ("input.txt","r","stdin");
freopen ("output.txt","w","stdout");
*/
ios_base::sync_with_stdio(false) , cin.tie(NULL) , cout.tie(NULL);
int t; cin>>t;
while (t--) {
	ll n; cin>>n;
	vll c (n);
	vll pre , pro , mino, mine;
	F (i,0,n,1) cin>>c[i];
	pre.pb (c[0]);
	F (i,2,n,2) pre.pb(c[i]+pre.back());
	pro.pb (c[1]);
	F (i,3,n,2) pro.pb(c[i]+pro.back());
	mine.pb (c[0]); mino.pb (c[1]);
	F (i,2,n,2) {
		mine.pb(min(mine.back(),c[i]));
	}
	F (i,3,n,2) {
		mino.pb(min(mino.back(),c[i]));
	}
	ll cost = 1e18;
	F (i,2,n+1,1) {
		int ev=(i+1)/2 , odd = i/2;
		ll res = (mino[odd-1]*(n-odd+1)+pro[odd-1]-mino[odd-1]);
		res += (mine[ev-1]*(n-ev+1)+pre[ev-1]-mine[ev-1]);
		cost = min (cost, res);
	}
	cout<<cost<<endl;
}
return 0;
}
/* What we know is a drop , but what we don't know is an ocean !*/