#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <ctime>
#include <cmath>
#include <string>
#include <set>
#include <map>
#include <fstream>
#include <stack>

using namespace std;

typedef long long ll;
#define all(x) x.begin(), x.end()
//#define fi first
//#define se second
ll inf = 1e18 + 7;
ll mod = 998244353;
ll maxn = 2e5 + 5;
vector<ll> pref(maxn);
vector<ll> r_pref(maxn);

//ifstream fin;
//ofstream fout;

ll bin_pow(ll a, ll b){
    if (b == 0){
        return 1;
    }
    if (b % 2){
        return (bin_pow(a, b - 1) * a)%mod;
    }else{
        ll now = bin_pow(a, b / 2);
        return (now * now) % mod;
    }
}


int main(){
    srand(time(NULL));

    //cout.setf(ios::fixed);
    //cout.precision(20);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    //fin.open("r.txt");
    //fout.open("w.txt");

    int t;
    cin >> t;
    for (int ctr = 0; ctr < t; ctr++){
        ll n;
        cin >> n;
        vector<ll> c(n);
        for (int i = 0; i < n; i++){
            cin >> c[i];
        }
        ll last_up = inf;
        ll last_r = inf;
        ll ans = c[0] * (n) + c[1] * (n);
        last_up = c[0];
        last_r = c[1];
        ll cnt = c[0] + c[1];
        ll k_1 = 1;
        ll k_2 = 1;
        for (int i = 2; i < n; i++){
            if (i % 2 == 1){
                ll now = cnt + (n - k_1) * last_up + (n - k_2) * c[i];
                ans = min(ans, now);
                cnt += c[i];
                k_2++;
                last_r = min(last_r, c[i]);
            }else{
                ll now = cnt + (n - k_2) * last_r + (n - k_1) * c[i];
                ans = min(ans, now);
                cnt += c[i];
                k_1++;
                last_up = min(last_up, c[i]);
            }
        }
        //cout << ans << endl;
        last_up = c[1];
        last_r = c[0];
        cnt = c[0] + c[1];
        k_1 = 1;
        k_2 = 1;
        for (int i = 2; i < n; i++){
            if (i % 2 == 0){
                ll now = cnt + (n - k_1) * last_up + (n - k_2) * c[i];
                ans = min(ans, now);
                cnt += c[i];
                k_2++;
                last_r = min(last_r, c[i]);
            }else{
                ll now = cnt + (n  - k_2) * last_r + (n - k_1) * c[i];
                ans = min(ans, now);
                cnt += c[i];
                k_1++;
                last_up = min(last_up, c[i]);
            }
        }
        cout << ans << endl;
    }



    //cout << "NO" << endl;
    //fout.close();
    return 0;
}
