#include <bits/stdc++.h>

using namespace std;


typedef long long int ll;
int main(){
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        ll c[n];
        for(int i = 0 ; i  < n ; i++){
            cin>>c[i];
        }  
        ll pn = n;
        ll pb=n;  
        ll miniodd = c[0];
        ll minieven = c[1];
        ll pref = miniodd+minieven;
        ll hasil = (pb*miniodd)+(pn*minieven)+pref-(miniodd+minieven);
       /* cout<<hasil<<endl;
        pn--;
        pb--;*/
        for(int i = 2  ; i<n ; i++){
            pref+=c[i];
            if(i%2==0){
                pb--;
                miniodd=min(c[i],miniodd);
            }else{
                pn--;
                minieven=min(c[i],minieven);
                 
                
            }
            hasil =min(hasil, (pb*miniodd)+(pn*minieven)+pref-(miniodd+minieven));
        }
        cout<<hasil<<"\n";
    }


    return 0;
}