Help for problem

Revision en1, by Medeali, 2023-08-17 13:41:53

https://arena.moi/problem/moi21qualnones this is my code #include

include

using namespace std;

int main() { int t; cin>>t; while(t--){ string n; long long a; cin>>n>>a; long long o=0,s=0; for(char i : n){ if(i=='1') s++; if(s==a){ o++; s=0; } } cout<<o<<endl; } return 0; } i am struggling in finding the issue

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Medeali 2023-08-17 13:41:53 537 Initial revision (published)