#include<cmath>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<stack>
#include<map>
#include<set>
#include<sstream>
#include<queue>
#include<cstring>
#include<cmath>
#include<vector> 
using namespace std;
#define ll long long
#define INF 0x3f3f3f3f
ll a[200005];
int main()
{
	ll t,n,sum,ans;
	cin>>t;
	while(t--)
	{
		cin>>n;
		ans=INF;
		for(ll i=1;i<=n;i++)
		cin>>a[i];
		ll min1,min2,cnt1,cnt2;
		min1=a[1],min2=a[2];
		cnt1=n-1,cnt2=n-1;
		sum=a[1]+a[2];
		ans=a[1]*n+a[2]*n;
		for(ll i=3;i<=n;i++)
		{
			if(i%2==1)
			{
				cnt1--;
				min1=min(min1,a[i]);
			}
			else{
				cnt2--;
				min2=min(min2,a[i]);
			}
			sum+=a[i];
			ans=min(ans,sum+cnt1*min1+cnt2*min2);
		}
		cout<<ans<<endl;
	}
	return 0;
} 
