Language: C++

include <bits/stdc++.h>
    using namespace std;
    /*const long long M = 1000000007 , N = 1001;
    int r1,r2,r3,c1,c2,c3,c4,n,polycoff[N][N],group2[N][N];
    string s1,s2,s3;
    void fix(int &a){
    	if(a >= M){
    		a -= M;
    	}else if(a < 0){
    		a += M;
    	}
    }
    int main(){
    	cin >> n >> r1 >> s1 >> r2 >> s2 >> r3 >> s3;
    	for(int i = 0 ; i < n ; i += 1){
    		if(s1[i] != s2[i] && s2[i] == s3[i]){
    			c1 += 1;
    		}else if(s1[i] != s2[i] && s1[i] == s3[i]){
    			c2 += 1;
    		}else if(s1[i] == s2[i] && s2[i] != s3[i]){
    			c3 += 1;
    		}else{
    			c4 += 1;
    		}
    	}
    	int rr1 = r1-c2-c3-c4 , rr2 = r2-c1-c3-c4 , rr3 = r3-c1-c2-c4;
    	for(int i = 0 ; i <= n ; i += 1){
    		polycoff[i][0] = polycoff[i][i] = 1;
    		for(int j = 1 ; j < i ; j += 1){
    			polycoff[i][j] = polycoff[i-1][j] + polycoff[i-1][j-1];
    			fix(polycoff[i][j]);
    		}
    	}
    	for(int i = 0 ; i <= c3 ; i += 1){
    		for(int j = 0 ; j <= c4 ; j += 1){
    			group2[i+j][i-j+c4] = (long long)polycoff[c3][i] * polycoff[c4][j]%M;
    		}
    	}
    	for(int i = 0 ; i <= c3+c4 ; i += 1){
    		for(int j = -c4 ; j <= c3 ; j += 1){
    			int jj = j+c4;
    			group2[i][jj] += (i > 0 ? group2[i-1][jj] : 0) + (jj > 0 ? group2[i][jj-1] : 0);
    			fix(group2[i][jj]);
    			if(i > 0 && jj > 0){
    				group2[i][jj] -= group2[i-1][jj-1];
    			}
    			fix(group2[i][jj]);
    		}
    	}
    	long long ans = 0;
    	for(int i = 0 ; i <= c1 ; i += 1){
    		for(int j = 0 ; j <= c2 ; j += 1){
    			int rrr1 = rr1 - i + j,rrr2 = rr2 + i - j , rrr3 = rr3 + i + j , rrr4 = max(-rrr1,-rrr2);
    			if(rrr4 > c3+c4 || rrr3+c4 < 0){
    				continue;
    			}
    			rrr3 = min(rrr3,c3);
    			ans += (polycoff[c1][i]*polycoff[c2][j])*(group2[rrr4][c3+c4]-(rrr3+c4 > 0 ? group2[rrr4][rrr3+c4-1] : 0));
    			ans %= M;
    		}
    	}
    	cout << (ans+M)%M << endl;
    }
    */
    /*
    3
    1 000
    1 100
    0 111
    */
     
    int main(){
    	long long n,m;
    	cin >> n >> m;
    	bool p = true;
    	long long f = 1 , g = 1 , a;
    	for(long long i = 0 ; i < n ; i += 1){
    		cin >> a;
          	if(a % 2 == 1){
            	cout << 0 << endl;
              return 0;
	        }
    		if(p){
    			g = (g*a)/__gcd(g,a);
    		}
    		f = (f*(a/2))/__gcd(f,(a/2));
    		if(g > m){
    			p = false;
    		}
    		if(f > m){
    			cout << 0 << endl;
    			return 0;
    		}
    	}
    	cout << (m+g-1)/g << endl;
    }

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:74:9: error: 'cin' was not declared in this scope
   74 |         cin >> n >> m;
      |         ^~~
a.cc:80:17: error: 'cout' was not declared in this scope
   80 |                 cout << 0 << endl;
      |                 ^~~~
a.cc:80:30: error: 'endl' was not declared in this scope
   80 |                 cout << 0 << endl;
      |                              ^~~~
a.cc:84:35: error: '__gcd' was not declared in this scope
   84 |                         g = (g*a)/__gcd(g,a);
      |                                   ^~~~~
a.cc:86:31: error: '__gcd' was not declared in this scope
   86 |                 f = (f*(a/2))/__gcd(f,(a/2));
      |                               ^~~~~
a.cc:91:25: error: 'cout' was not declared in this scope
   91 |                         cout << 0 << endl;
      |                         ^~~~
a.cc:91:38: error: 'endl' was not declared in this scope
   91 |                         cout << 0 << endl;
      |                                      ^~~~
a.cc:95:9: error: 'cout' was not declared in this scope
   95 |         cout << (m+g-1)/g << endl;
      |         ^~~~
a.cc:95:30: error: 'endl' was not declared in this scope
   95 |         cout << (m+g-1)/g << endl;
      |                              ^~~~