Help me in solving FKMC problem

My issue

unable to solve give hint please

My code

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

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--){
	    int n;
	    cin>>n;
	    string s;
	    cin>>s;
	    int cnt=0;
	    for(int i=0;i<n;i++){
	        if(s[i]=='0'){
	            cnt++;
	        }
	    }
	    if(cnt==0){
	        cout<<n<<endl;
	    }
	    else{
	        cout<<cnt<<endl;
	    }
	    
	}

}

Problem Link: Fake Certificate Practice Coding Problem