#include<bits/stdc++.h>
#define fast ios::sync_with_stdio(0), cin.tie(0)
using namespace std;
typedef long long ll;
const int N = 1e6 + 10; 
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
int n, a[N];

void solve() 
{
    ll ans = 1e18, sum = a[1];
    int cnt[2] = {0, 1};
    int mn[2] = {(int)1e9, a[1]};
    for(int i = 2; i <= n; ++ i) {
        ++ cnt[i & 1];
        mn[i & 1] = min(mn[i & 1], a[i]);
        sum += a[i];
        ans = min(ans, 1LL * (n - cnt[0]) * mn[0] + 1LL * (n - cnt[1]) * mn[1] + sum);
    }
    cout << ans << endl;
}

int main () {  
    int t;
    cin >> t;
    while(t --)
    {
        cin >> n;
        for(int i = 1; i <= n; ++ i) cin >> a[i];
        solve();
    }
    return 0;
}