#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define inf 0x3f3f3f3f
#define pii pair<int, int>
#define fi first
#define se second
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define PAUSE system("pause");
const int maxn = 1e5 + 10;
const int mod = 1e9 + 7;
int t, n;
ll c[maxn];
void solve() {
    scanf("%d", &n);
	for(int i = 1; i <= n; i++) scanf("%lld", &c[i]);
	ll minn1 = c[1], minn2 = c[2];
	ll sum = (minn1 + minn2) * n;
	ll sum1 = c[1], sum2 = c[2];
	for(int i = 3; i <= n; i++) {
		if(i % 2) {
			minn1 = min(minn1, c[i]);
			sum1 += c[i];
		}
		else{
			minn2 = min(minn2, c[i]);
			sum2 += c[i];
		}
		ll tmp = n - i / 2;
		sum = min(sum, (tmp - i % 2) * minn1 + tmp * minn2 + sum1 + sum2);
	}
	printf("%lld\n", sum);
}
int main() {
	scanf("%d", &t);
	while(t--)
		solve();
	return 0;
}