criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
using namespace std;
int main() {
	int N, A[210];
	cin >> N;
	for (in i = 0; i < N; i++) {
		cin >> A[i];
	}
	int ans=0;
	bool exist_odd=false;

	while (true) {

		for (int i = 0; i < N; i++) {
			if (A[i] % 2 != 0) {
				exist_odd = true;
			}
		}
		if (exist_odd) {
			break;
		}
		for (int i = 0; i < N; i++) {
			A[i] /= 2;
		}
		ans++;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'in' was not declared in this scope; did you mean 'int'?
    6 |         for (in i = 0; i < N; i++) {
      |              ^~
      |              int
a.cc:6:24: error: 'i' was not declared in this scope
    6 |         for (in i = 0; i < N; i++) {
      |                        ^
Language: C++

#include <iostream>
#include <string>
using namespace std;

int N;
int A[210];

int main2() {
	cin >> N;
	for (int i = 0; i < N; i++)cin >> A[i];

	int counter = 0;
	while(true){
		bool flag = true;
		for (int i = 0; i < N; i++) {
			if (A[i] % 2 != 0)flag = false;
		}
		if (flag) {
			for (int i = 0; i < N; i++) A[i] = A[i] / 2;
			counter++;
		}
		else
			break;
	}
	cout << counter << endl;
}

Compiler output:
a.cc: In function 'int main2()':
a.cc:26:1: warning: no return statement in function returning non-void [-Wreturn-type]
   26 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  int kekka = 10000000000;
  while(i < N){
    int A;
    cin >> A;
    kaz = 0;
    while(A % 2 == 0){
      A = A / 2;
      kaz++;
    }
    if(kaz < kekka){
      kekka = kaz;
    }
  }
    cout << "kekka" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000' to '1410065408' [-Woverflow]
    7 |   int kekka = 10000000000;
      |               ^~~~~~~~~~~
a.cc:8:9: error: 'i' was not declared in this scope
    8 |   while(i < N){
      |         ^
a.cc:11:5: error: 'kaz' was not declared in this scope
   11 |     kaz = 0;
      |     ^~~
Language: Java

import java.util.Scanner;

public class Main {
	  public static void main(String args[]){
		    Scanner sc = new Scanner(System.in);

            int n = sc.nextInt();
            int[] a = new int[n];
            int[] count = new int[n];
            for(int i = 0; i < n; i++){
                a[i] = sc.nextInt();
                count[i] = 0;
                while(a[i] % 2 == 0){
                    a[i] /= 2;
                    count[i]++;
                }
            }
            int mincount = count[0];
            for(i = 0; i < n; i++){
                if(mincount > count[i]){
                    mincount = count[i];
                }
            }
            System.out.println(mincount);
            sc.close();
		  }
}

Compiler output:
Main.java:19: error: cannot find symbol
            for(i = 0; i < n; i++){
                ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
            for(i = 0; i < n; i++){
                       ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
            for(i = 0; i < n; i++){
                              ^
  symbol:   variable i
  location: class Main
Main.java:20: error: cannot find symbol
                if(mincount > count[i]){
                                    ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
                    mincount = count[i];
                                     ^
  symbol:   variable i
  location: class Main
5 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int f(int a){
  int q = 0;
  while(a%2 == 0){
    a = a/2;
    q++:
  }
  return q;
}

int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for(int i =0;i <N;i++){
    cin >> a[i];
    a[i] = f(a[i]);
  }
  int ans = 100000;
  for(int i =0;i <N;i++){
    ans = min(ans,a[i]);
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int f(int)':
a.cc:8:8: error: expected ';' before ':' token
    8 |     q++:
      |        ^
      |        ;
Language: C++

#include <iostream>
#include <string>
using namespace std;

int N;
int A[210];

int main() {
    cin >> N;
    for (int i = 0; i<N;++i) cin >> A[i];

    int res=10**9;

    for (int i=0; i<N; ++i){
      int count=0;
      while(A[i]%2==0){
        A[i]/=2;
        ++count;
      }

      if (res>count) res=count;
    }
    
    cout << res <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: invalid type argument of unary '*' (have 'int')
   12 |     int res=10**9;
      |                ^~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int N;
int A[210];

int main() {
    cin >> N;
    for (int i = 0; i<N;++i) cin >> A[i];

    int res=INF;

    for (int i=0; i<N; ++i){
      int count=0;
      while(A[i]%2==0){
        A[i]/=2;
        ++count;
      }

      if (res>count) res=count;
    }
    
    cout << res <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'INF' was not declared in this scope
   12 |     int res=INF;
      |             ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;//数の個数
  cin >> N;
  int d = 30;//これまでに見た数の2で割れる回数の最小値
  for(int i = 0; i < N; i++){
    cin >> A_i;//黒板に書かれた数
    int b_i = 0;
    while(A_i%2 == 0){
      A_i /= 2;
      b_i++;
    }
    if(d > b_i){
      d = b_i;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'A_i' was not declared in this scope
    9 |     cin >> A_i;//黒板に書かれた数
      |            ^~~
Language: C++

using namespace std;

int N;

int main() {
    cin >> N;
    int A[N];
    for (int i = 0; i < N; i++) {
        cin >> A[i];
    }
    int k = 0;
    while (1) {
        for (int i = 0; i < N; i++) {
            if (A[i] % 2 == 0) {
                A[i] /= 2;
            }
            else {
                break;
            }
        }
        k++;
    }
    cout << k << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> N;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:23:5: error: 'cout' was not declared in this scope
   23 |     cout << k << endl;
      |     ^~~~
a.cc:23:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:18: error: 'endl' was not declared in this scope
   23 |     cout << k << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

int log2(int);
  
int main(void){
  int N;
  cin >> N;
  int A[N];
  int R[N];
  for(int i = 0; i < N; ++i){
    cin >> A[i];
    R[i] = log2(A[i]);
  }

  int ans = R[0];
  for(int i = 1; i < N; ++i){
    if(ans > R[i]){
      ans = R[i];
    } else {
      
    }
  }
  cout << ans << endl;

  return 0;
}

int log2(int n){
  int ln = 0;

  while(n % 2  == 0){
    ln++;
    n = n/2;
  }

  return ln;
}
//あかん

#include <iostream>
using namespace std;

int main(void){
  int N;
  cin >> N;

  int A[N];
  int R[N] = {0};
  for(int i = 0; i < N; ++i){
    cin >> A[i];
  }
  for(int i = 0; i < N; ++i){
    while(A[i] % 2 == 0){
      ++R[i];
      A[i] = A[i]/2;
    }
  }

  int ans = 0;
  for(int i = 0; i < N; ++i){

    if(ans < R[i]){
      ans = R[i];
    } else {
      
    }
  }

  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc:44:5: error: redefinition of 'int main()'
   44 | int main(void){
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main(void){
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  int x[N];
  for(int i = 0; i < N; ++i){
    cin >>x[i];
  }
  
  int count = 0;
  int flag = 0;
  
  while(flag == 0){
    for(int i = 0; i < N; ++i){
      x[i] = x[i] /2;
      if(x[i] % 2 == 1){
        break;
        flag = 1;
      }
    }
    ++count;
  }
  cout << count << endl;
  reutrn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:3: error: 'reutrn' was not declared in this scope
   27 |   reutrn 0;
      |   ^~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int N;
int A[210];

int main(){
    cin>>N;
    for (int i=0;i<N;i++) cin>>A[i];
    int res=0;

while(true){
    bool exist_odd = false;
    for(int i=0;i<N,i++){
        if (A[i]%2 != 0) exist_odd = true;
    }
    if (exist_odd) break;

    for(int i=0;i<N;i++){
        A[i] /= 2;
    }
    res++;
}


cout<<res<<endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected ';' before ')' token
   14 |     for(int i=0;i<N,i++){
      |                        ^
      |                        ;
Language: Java

import java.util.Scanner;

public class B_ShiftOnly {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] aArray = new int[n];
		for (int i = 0; i < n; i++) {
			aArray[i] = scan.nextInt();
		}

		int opeCount = 0;
		end: while (true) {
			for (int i = 0; i < n; i++) {
				if (aArray[i] % 2 == 0) {
					aArray[i] = aArray[i] / 2;
				} else {
					break end;
				}
			}
			opeCount++;
		}
		System.out.println(opeCount);

	}

}


Compiler output:
Main.java:3: error: class B_ShiftOnly is public, should be declared in a file named B_ShiftOnly.java
public class B_ShiftOnly {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String args[]) {
		@SuppressWarnings("resource")
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] aArray = new int[n];
		for (int i = 0; i < n; i++) {
			aArray[i] = scan.nextInt();
		}

		int opeCount = 0;
		end: while (true) {
		for (int i = 0; i < n; i++) {
			if (aArray[i] % 2 == 0) {
				aArray[i] = aArray[i] / 2;
			} else {
				break end;
			}
		}
		opeCount++;
		}
		System.out.println(opeCount);

}


Compiler output:
Main.java:27: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <math.h>
using namespace std;

#define ll long long
//#define int long long
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;

#define dump(x)  cerr << #x << " = " << (x) << endl; 
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl; 


typedef pair<int, int> P;
int dx[4] = {0,1,0,-1};
int dy[4] = {1,0,-1,0};


signed main(){

	int N, or=0;
	cin >> N;


	for (int i = 0; i < N; i++){
		int a;
		cin >> a;
		or = or | a;
	}

	int result = 0;
	while (or % 2==0) { or = or >> 1; result++; }

	cout << result << endl;


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: expected unqualified-id before 'or' token
   28 |         int N, or=0;
      |                ^~
a.cc:35:17: error: expected primary-expression before 'or' token
   35 |                 or = or | a;
      |                 ^~
a.cc:35:20: error: expected primary-expression before '=' token
   35 |                 or = or | a;
      |                    ^
a.cc:35:22: error: expected primary-expression before 'or' token
   35 |                 or = or | a;
      |                      ^~
a.cc:35:25: error: expected primary-expression before '|' token
   35 |                 or = or | a;
      |                         ^
a.cc:39:16: error: expected primary-expression before 'or' token
   39 |         while (or % 2==0) { or = or >> 1; result++; }
      |                ^~
a.cc:39:19: error: expected primary-expression before '%' token
   39 |         while (or % 2==0) { or = or >> 1; result++; }
      |                   ^
a.cc:39:29: error: expected primary-expression before 'or' token
   39 |         while (or % 2==0) { or = or >> 1; result++; }
      |                             ^~
a.cc:39:32: error: expected primary-expression before '=' token
   39 |         while (or % 2==0) { or = or >> 1; result++; }
      |                                ^
a.cc:39:34: error: expected primary-expression before 'or' token
   39 |         while (or % 2==0) { or = or >> 1; result++; }
      |                                  ^~
a.cc:39:37: error: expected primary-expression before '>>' token
   39 |         while (or % 2==0) { or = or >> 1; result++; }
      |                                     ^~
Language: C++

#include <vector>
#include <algorithm>
#include <ctype.h>
using namespace std;
int main(void){
int N;
cin>>N;
int num[N];
for(int i=0;i<N;i++){
    cin>>num[i];
}
int c=0;

for(int i=0;i<N;i++){ int ans=0;
    for(int j=0;j<N;j++){
        if(num[j]%2==0) ans++;
    }
    if(ans==N) {for(int k=0;k<N;k++){
        num[k]=num[k]/2;
    } c++;
}
}
cout<<c;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin>>N;
      | ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <ctype.h>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:23:1: error: 'cout' was not declared in this scope
   23 | cout<<c;
      | ^~~~
a.cc:23:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int count_two(int x)
{
    int temp = x, result = 0;
    while(temp % 2 == 0)
    {
        result++;
        temp = temp / 2;
    }

    return result;
}

int main()
{
    int N; cin >> N;
    int arr[N]; int result = INT_MAX;

    for(int i = 0; i < N; i++)
    {
        cin >> arr[i];
        if(result > count_two(arr[i]))
        {
            result = count_two(arr[i]);
            if(result == 0)
            {
                cout << result << endl;
                return 0;
            }
        }
    }

    cout << result << endl;


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:30: error: 'INT_MAX' was not declared in this scope
   20 |     int arr[N]; int result = INT_MAX;
      |                              ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <vector>
  +++ |+#include <climits>
    3 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int a, i, j, k;
	cin >> a;
	int N[a];
	for (i = 0; i < a; i++)cin >> N[i];
	j = 0;
	do {
		k=0
		for (i = 0; i < a; i++) {
			if (N[i] % 2 == 0)k += 1;
			N[i] /= 2;
		}
		if (k != a)break;
		j += 1;
	} while (j > 0);
	cout << j;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: expected ';' before 'for'
   12 |                 k=0
      |                    ^
      |                    ;
   13 |                 for (i = 0; i < a; i++) {
      |                 ~~~ 
a.cc:13:39: error: expected ';' before ')' token
   13 |                 for (i = 0; i < a; i++) {
      |                                       ^
      |                                       ;
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int a, i, j, k;
	cin >> a;
	int N[a];
	for (i = 0; i < a; i++)cin >> N[i];
	j = 0;
	k = 0;
	do {
		for (i = 0; i < a; i++) {
			if (N[i] % 2 == 0)k += 1;
			N[i] /= 2;
		}
		if (k != a)break;
		j += 1;
	} while (j < 10**9);
	cout << j;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: invalid type argument of unary '*' (have 'int')
   19 |         } while (j < 10**9);
      |                         ^~
Language: C

#include <stdio.h>
int main(){
    int n,x,r=1<<29;
    for(scanf("%d",&n);n--;){
        int r0=0;
        for( scanf("%d",&x);;x%2<1;x/=2)r0++;
        if(r>r0)r=r0;
    }
    printf("%d\n",r);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:35: error: expected ')' before ';' token
    6 |         for( scanf("%d",&x);;x%2<1;x/=2)r0++;
      |            ~                      ^
      |                                   )
Language: C++

#include<iostream>
using namespace std;

int N
int a[210];

int main(){
  cin >> N;

  for(int i=0;i <N;i++)cin >> a[i];

  int res =0;

  while(true){
    bool odd= false;
  for(int i=0;i<N;i++){
    if(a[i]%2 != 0) odd = true;
  }

  if(odd)break;

  for(int i=0;i<N;i++){
    a[i] = a[i]/2;
  }
  res++;
  }
  cout << res <<endl;
}


Compiler output:
a.cc:5:1: error: expected initializer before 'int'
    5 | int a[210];
      | ^~~
a.cc: In function 'int main()':
a.cc:8:10: error: 'N' was not declared in this scope
    8 |   cin >> N;
      |          ^
a.cc:10:31: error: 'a' was not declared in this scope
   10 |   for(int i=0;i <N;i++)cin >> a[i];
      |                               ^
a.cc:17:8: error: 'a' was not declared in this scope
   17 |     if(a[i]%2 != 0) odd = true;
      |        ^
a.cc:23:5: error: 'a' was not declared in this scope
   23 |     a[i] = a[i]/2;
      |     ^
Language: C++

#include <cstudio>
#include <algorithm>
using namespace std;
 
int main(){
  int N,d,a,mini=200;
  scanf("%d",N); 
  for (int i=0;i<N;i++){
   scanf("%d",a);
    d=0;
    for(;a%2!=1;a/=2){
      d++;
    }
    mini=min(mini,d);
  }
  printf("%d\n",mini);
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: cstudio: No such file or directory
    1 | #include <cstudio>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int a[240];
int main ()
{
  int n;
  cin>>n;
  for (int i = 0; i < n; ++i)
  {
    cin>>a[i];

  }
  int res = 0;
  while (true)
  {
    bool exist_odd=false;
    for (int i = 0; i < n; ++i)
    {
      if (a%2 !=0) exit_odd=true;
    }
    if (exist_odd) break;
    for (int i = 0; i < n; ++i)
    {
      a[i]/=2;
    }
    ++res;
  }
  cout<<res<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: invalid operands of types 'int [240]' and 'int' to binary 'operator%'
   19 |       if (a%2 !=0) exit_odd=true;
      |           ~^~
      |           | |
      |           | int
      |           int [240]
a.cc:19:20: error: 'exit_odd' was not declared in this scope; did you mean 'exist_odd'?
   19 |       if (a%2 !=0) exit_odd=true;
      |                    ^~~~~~~~
      |                    exist_odd
Language: Java

import java.util.Scanner;

public class b {

    public static void main(String args[])
    {
	Scanner sc = new Scanner(System.in);

	int n = sc.nextInt();
	int mn = 1000000000;
	
	for(int i = 0; i < n; i++) {
	    
	    int a = sc.nextInt();

	    int cnt = 0;
	    while(a % 2 == 0) {
		cnt++;
		a /= 2;
	    }

	    mn = Math.min(mn, cnt);
	}
	
	System.out.println(mn);
    }
    
}


Compiler output:
Main.java:3: error: class b is public, should be declared in a file named b.java
public class b {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, s=1 k=-1;
  int A[200];
  cin >> N >> A[];
  while (s){
    for(int i=0; i < N; i++){
      if(!(A[i] % 2)){
        s = 0;
        break;
      }
      A[i] /= 2;
      }
    k++;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected ',' or ';' before 'k'
    5 |   int N, s=1 k=-1;
      |              ^
a.cc:7:17: error: expected primary-expression before ']' token
    7 |   cin >> N >> A[];
      |                 ^
a.cc:16:5: error: 'k' was not declared in this scope
   16 |     k++;
      |     ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++


#include "stdafx.h"
#include "sample.h"
#include<iostream>
#include<string>
#include<algorithm>
#include<functional>

using namespace std;

int howdividetwo(int n) {

	int sum = 0;

	while (n>0 || n % 2 == 0)
	{

		++sum;

		n /= 2;
	}

	return sum;

}

int main()
{
	int n;
	cin >> n;
	int a[200];

	int mi = 999999999;
	for (int i = 0; i < n; i++) {
		
		int buf;
		
		cin >> buf;

		mi=min(mi,howdividetwo(buf));
	}



    return 0;
}



Compiler output:
a.cc:2:10: fatal error: stdafx.h: No such file or directory
    2 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <iostream>
#include <string>
using namespace std;

int main() {
    int n, cnt = 0;
    int flag = 0;
    cin >> n;
    int a[n];
    for(int i = 0; i < n; i++) {
        cin >> a[i];
    }
    for(;;){
        for(int i = 0; i < n ; i++) {
            if(a[i] % 2 != 0)flag=1;
            a[i] = a[i] / 2;
        }
        if(flag==1)break;
        cnt++;
    }
    cout << cnt << endl;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

using namespace std;

int a[201];

int main()
{
  int n, ans;

  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];

  int m = 1;
  while (m) {
    for (int i = 0; i < n; i++) {
      x = a[i] / 2;
      if (x % 2 != 0) {
        m = 0;
        break;
      } else {
        a[i] = x;
      }
    }
  }

  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: 'x' was not declared in this scope
   17 |       x = a[i] / 2;
      |       ^
Language: C++

#include <iostream>
using namespace std;

int main(void){
  string a[200];
  int counter = 0, n;
  bool flag = true;
  cin >> n;
  for(int i = 0; i < n; i++) {
    cin >> a[i];
  }
  while(flag) {
    for(int i = 0; i < n; i++) if(a[i] % 2 == 1) flag = false;
    if(flag) {
      for(int i = 0; i < n; i++) a[i] /= 2;
      counter++;
    }
  }
  cout << counter;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:40: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   13 |     for(int i = 0; i < n; i++) if(a[i] % 2 == 1) flag = false;
      |                                   ~~~~ ^ ~
      |                                      |   |
      |                                      |   int
      |                                      std::string {aka std::__cxx11::basic_string<char>}
a.cc:15:39: error: no match for 'operator/=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   15 |       for(int i = 0; i < n; i++) a[i] /= 2;
      |                                  ~~~~~^~~~
Language: C++

#include <iostream>
using namespace std;

int main(void){
  string a[200];
  int counter = 0, n;
  bool flag = true
  cin >> n;
  for(int i = 0; i < n; i++) {
    cin >> a[i];
  }
  while(flag) {
    for(int i = 0; i < n; i++) if(a[i] % 2 == 1) flag = false;
    if(flag) {
      for(int i = 0; i < n; i++) a[i] /= 2;
      counter++;
    }
  }
  cout << counter;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'cin'
    8 |   cin >> n;
      |   ^~~
a.cc:13:40: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   13 |     for(int i = 0; i < n; i++) if(a[i] % 2 == 1) flag = false;
      |                                   ~~~~ ^ ~
      |                                      |   |
      |                                      |   int
      |                                      std::string {aka std::__cxx11::basic_string<char>}
a.cc:15:39: error: no match for 'operator/=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   15 |       for(int i = 0; i < n; i++) a[i] /= 2;
      |                                  ~~~~~^~~~
Language: C++

#include <iostream>
using namespace std;

int main(void){
  string a[200];
  int counter = 0, n;
  bool flag = true
  cin >> n;
  for(int i = 0; i < n; i++) {
    cin >> a[i];
  }
  while flag {
    for(int i = 0; i < n; i++) if(a[i] % 2 == 1) flag = false;
    if(flag) {
      for(int i = 0; i < n; i++) a[i] /= 2;
      counter++;
    }
  }
  cout << counter;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'cin'
    8 |   cin >> n;
      |   ^~~
a.cc:12:9: error: expected '(' before 'flag'
   12 |   while flag {
      |         ^~~~
      |         (
a.cc:12:13: error: expected ')' before '{' token
   12 |   while flag {
      |         ~~~~^~
      |             )
a.cc:13:40: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   13 |     for(int i = 0; i < n; i++) if(a[i] % 2 == 1) flag = false;
      |                                   ~~~~ ^ ~
      |                                      |   |
      |                                      |   int
      |                                      std::string {aka std::__cxx11::basic_string<char>}
a.cc:15:39: error: no match for 'operator/=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   15 |       for(int i = 0; i < n; i++) a[i] /= 2;
      |                                  ~~~~~^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a(int b){
    int c=0;
    while(!b%2){
        b/=2;
        c++;
    }
    return c;
}
int main()
{
    int n;
    cin>>n;
    int a[n],b[n];
    for(int i=0;i<n;i++){
        cin>>a[i];
        b[i]=a(a[i]);
    }
    sort(b,b+n);
    cout<<b[0]<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: 'a' cannot be used as a function
   18 |         b[i]=a(a[i]);
      |              ~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  vector<int> num(N);
  for (int i = 0; i < N ; i++){ cin >> num(i) ; }
  
  int counter = 0;
  int check = 1;
  while(check){
    for (int i = 0; i < N ; i++){
      if (num.at(i) % 2 == 0){
        num.at(i) = num.at(i) / 2;}
      else {
        check = 0;
        break;}
      counter++;
    }
  }
  
  cout << counter << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:9:43: error: no match for call to '(std::vector<int>) (int&)'
    9 |   for (int i = 0; i < N ; i++){ cin >> num(i) ; }
      |                                        ~~~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  vector<int> num(N);
  for (int i = 0; i < N ; i++){ cin >> num(i) ; }
  
  int counter = 0;
  int check = 1;
  while(check){
    for (int i = 0; i < N ; i++){
      if (num(i) % 2 == 0){
        num.at(i) = num.at(i) / 2;}
      else {
        check = 0;
        break;}
      counter++;
    }
  }
  
  cout << counter << endl;
}
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:43: error: no match for call to '(std::vector<int>) (int&)'
    9 |   for (int i = 0; i < N ; i++){ cin >> num(i) ; }
      |                                        ~~~^~~
a.cc:15:14: error: no match for call to '(std::vector<int>) (int&)'
   15 |       if (num(i) % 2 == 0){
      |           ~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int a,b=0,i,array[201];
  cin>>a;
  for(i=0;i<a;i++){
    cin>>array[i];
  }
  for(i=0;i<a;i++){
    if(array[i]%2!=0){
      cout<<0<<endl;
      return 0;
    }
  sort(array,array+a);
  while(array[0]%2==0){
    array[0]/=2;
    b++;
  }
  cout<<b<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include "stdafx.h"
#include<iostream>

using namespace std;


int main()
{

	int N;
	cin >> N;
	int A[210];

	int i;
	int hantei;
	int counter = 0;

	for(i=1;i<=N;i++){
		cin >> A[i];
	}
	
	do {
		hantei = 0;
		for (i = 1;i <= N;i++) {
			if (A[i] % 2 == 0) {
				hantei = hantei + 1;
				A[i] = A[i] / 2;
			}
		}
		counter++;
	} while (hantei == N);

	counter--;

	cout << counter << endl;

    return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>
using namespace std ;
int v,i,N;
string a,b ;
int main(){
   v = 100000000000　;
   cin >> a,b;
   for ( i =1 ; i<= N ; i = i + 1){
      while(a[i] % 2 == 0){
         a[i] = a[i]/2;
         b[i]++;
      }
      if( b[i] < v ){
         v = b[i] ;
      }
   }
   cout << v << endl ;
}





Compiler output:
a.cc:7:8: error: extended character 　 is not valid in an identifier
    7 |    v = 100000000000　;
      |        ^
a.cc: In function 'int main()':
a.cc:7:8: error: unable to find numeric literal operator 'operator""\U00003000'
    7 |    v = 100000000000　;
      |        ^~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std ;
int ans ;
string a ;
int main(){
   cin >> a;
   for i ==1 : n
   if(a[i] % 2 == 0)
      a[i] == a[i] / 2;
      ans++;
   cout << ans << endl ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected '(' before 'i'
    8 |    for i ==1 : n
      |        ^
      |        (
a.cc:8:8: error: 'i' was not declared in this scope
a.cc:12:23: error: expected ')' before ';' token
   12 |    cout << ans << endl ;
      |                       ^~
      |                       )
a.cc:8:8: note: to match this '('
    8 |    for i ==1 : n
      |        ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
 
int main(){
  int N;
  cin >> N;
  vector<int> A(210);
  for(int i=0;i<N;i++){
    cin >> A.at(i);
  }
  for(int j=0;j<N;j++){
    for(int k=0;k<N;k++){
      if(A.at(k)%2==1){
        

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected '}' at end of input
   14 |       if(A.at(k)%2==1){
      |                       ~^
a.cc:14:24: error: expected '}' at end of input
a.cc:13:25: note: to match this '{'
   13 |     for(int k=0;k<N;k++){
      |                         ^
a.cc:14:24: error: expected '}' at end of input
   14 |       if(A.at(k)%2==1){
      |                        ^
a.cc:12:23: note: to match this '{'
   12 |   for(int j=0;j<N;j++){
      |                       ^
a.cc:14:24: error: expected '}' at end of input
   14 |       if(A.at(k)%2==1){
      |                        ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	int n;cin>>n;
	int a[210];
	int ans=0;
	int mi=1000000;
	for(int i=0;i<n;i++){
		cin>>a[i];
		int c=0;
		while(a[i]%2==0){
			a[i]/=2;
			c++;
		}
		mi=min(c,mi);
	}
	cout<<mi<<endl;
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	int n;cin>>n;
	int a[210];
	int ans=0;
	int mi=1000000;
	for(int i=0;i<n;i++){
		cin>>a[i];
		int c=0;
		while(a[i]%2==0){
			a[i]/=2;
			c++;
		}
		mi=c;
	}
	cout<<mi<<endl;
	return 0;
}



Compiler output:
a.cc:24:5: error: redefinition of 'int main()'
   24 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	int n;cin>>n;
	int a[210];
	int ans=0;
	int mi=1000000;
	for(int i=0;i<n;i++){
		cin>>a[i];
		int c=0;
		while(a[i]%2==0){
			a[i]/=2;
			c++;
		}
		mi=min(c,mi);
	}
	cout<<mi<<endl;
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	int n;cin>>n;
	int a[210];
	int ans=0;
	int mi=1000000;
	for(int i=0;i<n;i++){
		cin>>a[i];
		int c=0;
		while(a[i]%2==0){
			a[i]/=2;
			c++;
		}
		mi=c;
	}
	cout<<mi<<endl;
	return 0;
}


Compiler output:
a.cc:24:5: error: redefinition of 'int main()'
   24 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include  <iostream>
#include  <string>
using namespace std;
int main(){
    int N,count=0,i=0,b,c=0;
    int A[200];
    cin>>N;
    for(i=0;i<N;i++){
        cin>>A[i];
    }

while(1){
    for(i=0;i<N;i++){
        b=A[i]%2;
        if(b==1)c=1;
        A[i]=A[i]/2;
    }
    if(c==1)break;
    count++;
}


    cout << count <<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:23:26: error: expected '}' at end of input
   23 |     cout << count <<endl;
      |                          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.util.Scanner;

public class ShiftOnly {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.nextLine());
		boolean flag = true;
		int ans = 0;
		int[] A = new int[N];
		for (int i = 0; i < N; i++) {
			A[i] = sc.nextInt();
		}

		while (flag) {
			for (int j = 0; j < N; j++) {
				if (A[j] % 2 != 0) {
					flag = false;
				}
			}
			if(flag == false) break;
			for (int k = 0; k < N; k++) {
				A[k] = A[k] / 2;
			}
			ans++;

		}

		System.out.println(ans);

	}
}


Compiler output:
Main.java:3: error: class ShiftOnly is public, should be declared in a file named ShiftOnly.java
public class ShiftOnly {
       ^
1 error
Language: C++

using namespace std;

int N;
int A[210];

int main() {
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> A[i];
  
  int res = 0;
  
  while (true) {
    bool exist_odd = false;
    for (int i = 0; i < N; ++i) {
      if (A[i] % 2 != 0) exist_odd = true;
    }
    if (exist_odd) break;
    for (int i =0; i<N; ++i){
      A[i] /= 2;
    }
    ++res;
  }
  cout << res<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:23:3: error: 'cout' was not declared in this scope
   23 |   cout << res<<endl;
      |   ^~~~
a.cc:23:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:16: error: 'endl' was not declared in this scope
   23 |   cout << res<<endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int count = 0;
        int count2 = 0;
        int[] b = new int[a];
        for(int i = 0;i<a;i++){
            b[i] = sc.nextInt();
        }
        int flag = 0;
        while(flag == 0){
            for(int j = 0;j<a;j++){
                if(b[j] % 2 == 0){
                    b[j] = b[j]/2;
                    count2++;
                }
                if(count2 == a){
                    count++;
                    count2 = 0;
                }
            }
            for(int j = 0;j<1;j++){
                if(b[j] % 2 != 0){
                    flag++;
                }
            }
            if(flag != 0){
                break;
            }
        }
        System.out.println(count);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C

#include<stdio.h>
int main(){
  int N=0,A[200],count=1,i;
  for(i=0;i<N;i++){
    scanf("%d",&a[i]);}
  while(count==1){
    for(i=0;i<n;i++){
      if(a[i]%2=1)count=0;
      a[i]=a[i]/2;
    }
    N++;
  }
  N--;
  printf("%d\n",N);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:5:17: error: 'a' undeclared (first use in this function)
    5 |     scanf("%d",&a[i]);}
      |                 ^
main.c:5:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:15: error: 'n' undeclared (first use in this function)
    7 |     for(i=0;i<n;i++){
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<int> v(n);
  int ans = 0;
  for(int i = 0; i < n; i++){
    con >> v[i];
  }
  while(1){
    for(int i = 0; i < n; i++){
    a = 0;
    if(v[i] % 2 == 0){
      cout << ans << endl;
      return 0;
    }
      for(int j = 0; j < n; j++){
        v[j] /= 2;
        ans++;
      }
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'con' was not declared in this scope; did you mean 'cos'?
   10 |     con >> v[i];
      |     ^~~
      |     cos
a.cc:14:5: error: 'a' was not declared in this scope
   14 |     a = 0;
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<int> v(n);
  int a = 0, ans = 0;
  for(int i = 0; i < n; i++){
    con >> v[i];
  }
  for(int i = 0; i < n; i++){
    a = 0;
    if(v[i] % 2 == 0){
      a++;
    }
    if(a == n){  
      for(int j = 0; j < n; j++){
        v[j] /= 2;
        ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'con' was not declared in this scope; did you mean 'cos'?
   10 |     con >> v[i];
      |     ^~~
      |     cos
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
	int N;
	int A[210] = { 0 };
	int target = 0;

	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
	}

	for (int i = 1;; i++) {
		target = std::pow(2, i);

		for (int idx = 0; idx < N; idx++) {
			if ((A[idx] % target) != 0) {
				cout << i - 1 <<endl;
				return 0;
			}
		}

	}
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: 'pow' is not a member of 'std'
   17 |                 target = std::pow(2, i);
      |                               ^~~
Language: C++

#include<bits/stdc++.h>                                                                                              
  2 using namespace std;
  3 int main()
  4 {
  5     int N;
  6     cin>>N;
  7     int A[N];
  8     int kai;
  9     int count[N];
 10     for(int i=0;i<N;i++)
 11     {
 12         cin>>A[i];
 13     }
 14     for(int i=0;i<N;i++)
 15     {
 16         for(int h=0;h<500000;h++)
 17         {
 18          if(A[i]%2==1)
 19           {
 20               kai=h;
 21               break;
 22           }
 23          A[i]=A[i]/2;
 24         }
 25         count[i]=kai;
 26     }
 27     sort(count,count+N);
 28     cout<<count[0]<<endl;
 29 }


Compiler output:
a.cc:2:3: error: expected unqualified-id before numeric constant
    2 |   2 using namespace std;
      |   ^
a.cc:3:3: error: expected unqualified-id before numeric constant
    3 |   3 int main()
      |   ^
Language: Java

import java.util.Scanner;

/**
 *
 * @author psygn
 */
public class main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();
        long[] numbers = new long[num];
        long count = 0;

        for (int i = 0; i < num; i++) {
            numbers[i] = scanner.nextLong();
        }

        while (true) {
            if (!allEven(numbers)) {
                break;
            }
            for (int i = 0; i < num; i++) {
                if (numbers[i] % 2 == 0) {
                    numbers[i] = numbers[i] / 2;
                }
            }
            count++;
        }
        
        System.out.println(count);

    }

    public static boolean allEven(long[] numbers) {
        for (long l : numbers) {
            if (l % 2 != 0) {
                return false;
            }
        }
        return true;
    }

}

Compiler output:
Main.java:7: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n,ans;
    bool x = true;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n;i++){
        cin >> a.at(i);
    }
    while(x){
        for (int i = 0; i < n; i++){
            if(a.at(i)%=1){
                x = false;
                 break;
            }
            a /= 2;
        }
        if(x) break;
        ans++;
    }

        cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: no match for 'operator/=' (operand types are 'std::vector<int>' and 'int')
   18 |             a /= 2;
      |             ~~^~~~
Language: C++

#include <iostream>
using namespace std;

int N;
int A[210];

int main(){

  cin >> N;
  for(int i =0; i < N; i++) cin >> A[i];
  
  int res = 0;
  
  while(true){
    bool exist_odd = false; //A[i]がすべて偶数かどうかを判定
    for(int i = 0; i < N; i++){
      if(A[i] % 2 != 0) exist_odd = ;
    }
    
    if(exist_odd) break;
    
    for(int i =0; i < N; i++){
      A[i] /= 2;
    }
    
    res++;
  }
  cout << res << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:37: error: expected primary-expression before ';' token
   17 |       if(A[i] % 2 != 0) exist_odd = ;
      |                                     ^
Language: C++

#include <bits/stdc++.h>
    using namespace std;
     
int out(a){
	cout << a << endl;
	return 0;
}

int main(){
    	int N;
    	cin >> N;
    	vector<long int> vec (N);
    	for(int i = 0;i<N;i++){
    		cin >> vec.at(i);
    	}
    	for(int a = 0;true;a++){
    		for(int i = 0;i < N;i++){
    			if(vec.at(i) % 2 != 0){
    				out(a);
    				return 0;
    			}
    		}
    		for(int i = 0;i < N;i++){
    			vec.at(i) /= 2;
    		}
    	}
    	
}

Compiler output:
a.cc:4:9: error: 'a' was not declared in this scope
    4 | int out(a){
      |         ^
a.cc: In function 'int main()':
a.cc:19:36: error: 'out' cannot be used as a function
   19 |                                 out(a);
      |                                 ~~~^~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int N;
int A[500];
int main(){
cin >>n;
for (int i=0; i < n; ++i)
cin >> A[i];
int x = 0;
while(true){
bool exist_odd = false;
for(int i=0; i<n ++i)
if(A[i]%2 == 1)exist_odd
if (exist_odd) break;

for (int i = 0; i<N; ++i){
A[i]/=2;
}
++x;
}
cout <<x<< endl;
}


}#include<iostream>
#include<string>
using namespace std;
int N;
int A[500];
int main(){
cin >>n;
for (int i=0; i < n; ++i)
cin >> A[i];
int x = 0;
while(true){
bool exist_odd = false;
for(int i=0; i<n ++i)
if(A[i]%2 == 1)exist_odd
if (exist_odd) break;

for (int i = 0; i<N; ++i){
A[i]/=2;
}
++x;
}
cout <<x<< endl;
}


}

Compiler output:
a.cc:26:2: error: stray '#' in program
   26 | }#include<iostream>
      |  ^
a.cc: In function 'int main()':
a.cc:7:7: error: 'n' was not declared in this scope
    7 | cin >>n;
      |       ^
a.cc:13:20: error: expected ';' before 'i'
   13 | for(int i=0; i<n ++i)
      |                    ^
      |                    ;
a.cc:14:25: error: expected ';' before 'if'
   14 | if(A[i]%2 == 1)exist_odd
      |                         ^
      |                         ;
   15 | if (exist_odd) break;
      | ~~                       
a.cc: At global scope:
a.cc:26:1: error: expected declaration before '}' token
   26 | }#include<iostream>
      | ^
a.cc:26:3: error: 'include' does not name a type
   26 | }#include<iostream>
      |   ^~~~~~~
a.cc:29:5: error: redefinition of 'int N'
   29 | int N;
      |     ^
a.cc:4:5: note: 'int N' previously declared here
    4 | int N;
      |     ^
a.cc:30:5: error: redefinition of 'int A [500]'
   30 | int A[500];
      |     ^
a.cc:5:5: note: 'int A [500]' previously declared here
    5 | int A[500];
      |     ^
a.cc:31:5: error: redefinition of 'int main()'
   31 | int main(){
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main(){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:32:7: error: 'n' was not declared in this scope
   32 | cin >>n;
      |       ^
a.cc:38:20: error: expected ';' before 'i'
   38 | for(int i=0; i<n ++i)
      |                    ^
      |                    ;
a.cc:39:25: error: expected ';' before 'if'
   39 | if(A[i]%2 == 1)exist_odd
      |                         ^
      |                         ;
   40 | if (exist_odd) break;
      | ~~                       
a.cc: At global scope:
a.cc:51:1: error: expected declaration before '}' token
   51 | }
      | ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {    
	Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int count = 0;
    int[] arr = new int[];
    for(int i = 0; i < n; i++) {
      arr[i] = sc.nextInt();
    }
    boolean even = true;
    while(even) {
      for(int i = 0; i < n; i++) {
        if(arr[i] % 2 == 1) {
          even = false;
          break;
        } else {
          arr[i] = arr[i] / 2;
        }
      }
      if(even) {
        count++;
      }
    }
    System.out.println(count);
  }
}

Compiler output:
Main.java:8: error: array dimension missing
    int[] arr = new int[];
                         ^
1 error
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {    
	Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int count = 0;
    int[] arr = new int[];
    for(int i = 0; i < n; i++) {
      arr[i] = sc.nextInt();
    }
    boolean even = true;
    while(even) {
      for(int i = 0; i < n; i++) {
        if(arr[i] % 2 == 1) {
          even = false;
          break;
        }
      }
      if(even) {
        count++;
      }
    }
    System.out.println(count);
  }
}

Compiler output:
Main.java:8: error: array dimension missing
    int[] arr = new int[];
                         ^
1 error
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {    
	Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] arr = new int[n];
    for(int i = 0; i < n; i++) {
      arr[i] = sc.nextInt();
    }
    int count = 0;
      for(int i = 0; i < n; i++) {
        if(arr[i] % 2 == 1) {
          break;
        } else {
          count++;
        }
        System.out.println(count);
  }
}

Compiler output:
Main.java:20: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Iterator;
import java.util.Collections;
import java.util.Comparator;
import java.util.Random;
import java.util.Map;
import java.util.HashMap;
 
class Main{
        public static void main(String args[]){
                Scanner sc = new Scanner(System.in);
                int N = sc.nextInt();
                int[] a = new int[N];
                for(int i=0; i<N; i++){
                    a[i] = sc.nextInt();
                }
                int count=0;
                boolean ch = true;
                for(count=0; ; count++){
                    for(int a : a){
                        if(a%2 == 0){
                            a /= 2;
                        }else{
                            ch = false;
                            break;
                        }
                    }
                    if(!ch)break;
                }
                System.out.println(count);
        }
}

Compiler output:
Main.java:23: error: variable a is already defined in method main(String[])
                    for(int a : a){
                            ^
1 error