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

const int mn=1e5+7;
int n;
long long ans,c[mn];

int main()
{
    int tests;scanf("%d",&tests);
    while(tests--) {
        ans=1e18;
        scanf("%d",&n);
        long long min1=2e10,min2=2e10,pos1=0,pos2=0,cnt1=0,cnt2=0;
        long long sum1=0,sum2=0;
        for(int i=1;i<=n;++i) scanf("%lld",c+i);
        for(int i=1;i<=n;++i) {
            if(i%2) {
                if(c[i]<min1) min1=c[i],pos1=i;
                sum1+=c[i];
                cnt1++;
            }
            else {
                if(c[i]<min2) min2=c[i],pos2=i;
                sum2+=c[i];
                cnt2++;
            }
            // cout<<cnt1<<" "<<cnt2<<endl;
            if(cnt1&&cnt2) {
                ans=min(ans,sum1+sum2+(n-cnt1)*c[pos1]+(n-cnt2)*c[pos2]);
            }
        }
        cout<<ans<<endl;
    }
}