#include <cstdio>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <algorithm>
#include <numeric>
#include <utility>
#include <random>
#include <chrono>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#define all(a) a.begin(), a.end()
#define endl "\n"
using namespace std;
using ll = long long;
using ld = long double;
using PII = pair<int, int>;
using VI = vector<int>;
using VII = vector<pair<int, int> >;

//const ll MOD = 998244353;
const ll MOD = 1e9+7;
const double eps = 1e-8;
const double PI = acos(-1.0);
const int MAX = 1e5+50;
ll c[MAX], mio[MAX], mie[MAX];
ll sumo[MAX], sume[MAX];

void solve(){
	int n; scanf("%d", &n);
		for (int i = 0; i < n+5; i++) mio[i] = mie[i] = 0x3f3f3f3f, sumo[i] = sume[i] = 0;
		for (int i = 1; i <= n; i++) scanf("%lld", &c[i]);


		ll res = 0x3f3f3f3f3f3f3f3f;
		for (int i = 1; i <= n; i++){
			if (i & 1){

				mio[i] = min(mio[max(0, i-2)], c[i]);

				sumo[i] = sumo[max(0, i-2)] + c[i];
			}else{

				mie[i] = min(mie[i-2], c[i]);

				sume[i] = sume[i-2] + c[i];
			}

		}
		// for (int i = 1; i <= n; i++) printf("%lld%c", mio[i], " \n"[i==n]);
		// for (int i = 1; i <= n; i++) printf("%lld%c", sumo[i], " \n"[i==n]);
		// for (int i = 1; i <= n; i++) printf("%lld%c", mie[i], " \n"[i==n]);
		// for (int i = 1; i <= n; i++) printf("%lld%c", sume[i], " \n"[i==n]);
		// puts("---");
		for (int i = 2; i <= n; i++){
			ll t = 0LL;
			if (i & 1){
				t += sumo[i] - mio[i] + mio[i] * (1LL * (n-((i+1)/2-1)));


				t += sume[i-1] - mie[i-1] + mie[i-1] * (1LL * (n-(i/2-1)));

			}else{
				t += sumo[i-1] - mio[i-1] + mio[i-1] * (1LL * (n-(i/2-1)));


				
				t += sume[i] - mie[i] + mie[i] * (1LL * (n-(i/2-1)));


			}
			res = min(res, t);
		}
		printf("%lld\n", res);
}

int main(){
	//ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
	//cout << setprecision(2) << a << endl;
	int _ = 1; scanf("%d", &_);
	while (_--){
		solve();
	}
	return 0;
}

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

int main(){
	
	return 0;
}
*/