func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long mod = 1e9 + 5;   template <class T>   void read(vector<T> &arr) {     for (auto &x : arr) cin >> x;   }   template <class T>   void read(T &x) {     cin >> x;   }   template <class T>   void write(vector<T> &arr) {     for (auto x : arr) cout << x <<    ;     cout <<   n ;   }   template <class T>   void write(vector<vector<T>> &arr) {     for (auto &x : arr) {       for (auto &y : x) cout << y <<    ;       cout <<   n ;     }   }   template <class T>   void write(T &x) {     cout << x;   }   void solve() {     long long n;     cin >> n;     vector<long long> arr(n);     read(arr);     long long ans = 0;     bool isStarted = false;     for (long long i = 0; i < n; ++i) {       if (arr[i] == 1) {         isStarted = true;       }       if (arr[i] == 0 && isStarted) ans++;     }     for (long long i = n - 1; i > -1; --i) {       if (arr[i] == 1) break;       if (arr[i] == 0) ans--;     }     cout << ans <<   n ;   }   int32_t main() {     ios::sync_with_stdio(false);     cin.tie(nullptr);     cout.tie(nullptr);     long long t = 1;     cin >> t;     while (t--) {       solve();     }     return 0;   }   