#include <bits/stdc++.h>

#define MAXN 100003
#define ll long long
using namespace std;

ll a[MAXN];
int main()
{
    int T;
    scanf("%d",&T);
    while(T--)
    {
        ll n;
        scanf("%lld",&n);
        for(int i = 1;i <= n;i++)
            scanf("%lld",&a[i]);
        ll res = 0ll;
        ll ans = (a[1] + a[2]) * n;
        ll min1 = a[1],min2 = a[2];
        res = a[1] + a[2];
        for(ll i = 3;i <= n;i++)
        {
            res += a[i];
            if(i % 2ll == 1ll && min1 > a[i])
                min1 = a[i];
            if(i % 2ll == 0ll && min2 > a[i])
                min2 = a[i];
            ans = min(ans,res + min1 * (n - (i + 1ll) / 2ll) + min2 * (n - i / 2ll));
        }
        printf("%lld\n",ans);
    }
    return 0;
}
