#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ull unsigned long long
#define readFile freopen("in.txt", "r", stdin)
#define printFile freopen("out.txt", "w", stdout)

vector <ll> v;

// CHECK LONG LONG

int main() {
    ios_base::sync_with_stdio(false);

    int t;
    cin>>t;
    while(t--) {
        ll n, c, mn1 = 100000000000, mn2 = 100000000000;
        cin>>n;
        for(int i=0; i<n; ++i) {
            cin>>c;
            v.push_back(c);
        }

        ll x = n, y = n, total = 0, ans = -1;

        for(int i=0; i<n; ++i) {
            total = total + v[i];
            if(i%2==0) --x, mn1 = min(mn1, v[i]);
            else --y, mn2 = min(mn2, v[i]);
            if(ans==-1) ans = total + (x * mn1) + (y * mn2);
            else ans = min(ans, total + (x * mn1) + (y * mn2));
        }

        cout<<ans<<endl;

        v.clear();

    }
    return 0;
}
