#include using namespace std; using ll = long long; #define rep(i,n) for (int i=0;i<(int)(n);i++) int main(){ int t; cin>>t; rep(Ti,t){ int n; cin>>n; vector f(n); rep(i,n) cin>>f.at(i); int ct=0; rep(i,n) if(f.at(i)) ct++; cout<