#include<iostream> 
#include<vector> 
#include<algorithm>

using namespace std;
typedef long long ll;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(0);

    int t;
    for(cin>>t;t--;){
        ll n;
        cin>>n;
        vector<ll> c(n); 
        for(int i=0;i<n;i++){
            cin>>c[i]; 
        }
        ll minx = c[0];
        ll miny = c[1];
        ll minScore = n*minx+n*miny;
        ll totScore = c[0]+c[1];
        for(int i=2;i<n;i++){
            ll distx = i/2+1;
            ll disty = (i-1)/2+1;
            totScore+=c[i];
            if(i%2==0){
                minx = min(minx,c[i]);
            }else{
                miny = min(miny,c[i]);
            }

            minScore = min(totScore+minx*(n-distx)+miny*(n-disty),minScore);
           
        }
        cout<<minScore<<endl;

    }

	return 0;
}
