#include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int T;cin>>T; for(;T--;) { int N;string S; cin>>N>>S; vectorZ=atcoder::z_algorithm(S); int ans=0; for(int i=1;i=N) { if(i=i)ans++; else if(S[len]