#include <iostream>
#include <algorithm>
using namespace std;
const int N=5e6+7;
char str[N];
int main(){
int t;cin>>t;
for(int i=1;i<=t;i++){
int len;cin>>len>>str+1;
int m=(len+1)/2,res=0,k=0,sum=0;//向上取整
for(int j=1;j<=len;j++){
sum+=str[j]-'0',k++;
if(k==m){
res=max(res,sum);
sum-=str[j-m+1]-'0';
k-=1;
}
}
printf("Case #%d: %d\n",i,res);
}
return 0;
}
双指针写法