#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back
#define vi vector<int>
typedef long long ll;
typedef unsigned long long ull;
const int mod = 1e9 + 7;
void solve()
{
    int n;
    cin>>n;

    int cost[n];
    for(int i=0;i<n;i++) cin>>cost[i];

    int mn1 = cost[1];
    int mn2 = cost[0];

    int ans1 = n*cost[1];
    int ans2 = n*cost[0];
    int ans = ans1 + ans2;
    for(int i=2;i<n;i++){
        if(i%2){
            if(cost[i] < mn1){
                int gone = i/2;
                ans1 -= mn1*(n-gone);
                ans1 += cost[i]*(n-gone);
                mn1 = cost[i];
            }else{
                ans1 -= mn1;
                ans1 += cost[i];
            }
        }else{
            if(cost[i] < mn2){
                int gone = i/2;
                ans2 -= mn2*(n-gone);
                ans2 += cost[i]*(n-gone);
                mn2 = cost[i]; 
            }else{
                ans2 -= mn2;
                ans2 += cost[i];
            }
        }

        ans = min(ans,ans1+ans2);
    }

    cout<<ans<<endl;
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int tests = 1;
    cin>>tests;
    while (tests--)
    {
        solve();
    }
    return 0;
}