#include <bits/stdc++.h>
#define ll long long
using namespace std;
int t;
ll v[100005];

int main() {
    ios :: sync_with_stdio(0);
    cin.tie(0);

    cin >> t;
    for (int query = 1; query <= t; query++) {
        ll n;

        cin >> n;
        for (int i = 1; i <= n; i++)
            cin >> v[i];

        ll x = 0, y = 0;
        ll sum = 0, result = LLONG_MAX, minOdd = LLONG_MAX, minEven = LLONG_MAX;
        for (int i = 1; i <= n; i++) {
            if (i % 2)
                x++, minOdd = min(minOdd, v[i]);
            else
                y++, minEven = min(minEven, v[i]);
            sum += v[i];

            if (i > 1)
                result = min(result, sum + (n - x) * minOdd + (n - y) * minEven);
        }

        cout << result << '\n';
    }

    return 0;
}
