#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;


int main()
{
	ll t;
	cin>>t;
	while(t--)
	{
		ll n;
		cin>>n;
		ll c[n];
		for (int i = 0; i < n; ++i)
		{
			/* code */
			scanf("%lld", &c[i]);
		}
		ll ans1 = LLONG_MAX, ans2 = LLONG_MAX;
		ll ans = LLONG_MAX;
		ll oddsum = 0 , evensum = 0;
		// ll i1 = -1, i2 = -1;
		// ll min1 = 0;
		// vector<ll> dp(n,0);
		// dp[0]

		for (int i = 0; i < n; i++)
		{
				ll k = 0;

				ll u1 = 1, u2 = 1;
				if(i&1)
				{
					evensum += c[i];
					ans1 = min(ans1,c[i]);
					u1 = 0;
				}
				else
				{
					oddsum += c[i];
					ans2 = min(ans2,c[i]);
					u2 = 0;
				}
				k = evensum + (n-(i-1)/2-1)*ans1 + oddsum + (n-(i)/2-1)*ans2;
				if(i>=1)
				ans = min(ans,k);
				// prev = k;
		}
		cout<<ans<<endl;

	}
}