What is the mistake i am making here or which case I just can't think of. Please help me

My issue

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int n,x;
	cin>>x>>n;
	int fsum=0;
	while(n--)
	{
	    string s;
	    cin>>s;
	    int l=54;
	    for(int i=1;i<=l;i+=4)
	    {
	        int c=0;
	        for(int j=i;j<i+4;j++)
	        if(s[j-1]=='0')
	        c++;
	        //cout<<c<<" ";
	        if(s[l-1]=='0')
	        c++;
	        if(s[l-2]=='0')
	        c++;
	        l=l-2;
	        //cout<<c<<" ";
	        if(c==x)
	        fsum=fsum+1;
	        else if(c>x)
	        {
	            int com=c;
	           // cout<<com<<" ";
	            for(int j=1;j<x;j++){
	            com=com*(c-j)/(x-j);
	           // cout<<com<<" ";
	            }
	            com=com/x;
	            //cout<<com<<" ";
	            fsum=fsum+com;
	        }
	        cout<<fsum<<" ";
	    }
	}
	cout<<fsum<<endl;
	return 0;
}

Problem Link: DAILY Problem - CodeChef