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

#include <iostream>
#include <string>

using namespace;
int N;
int A[210];

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

  while(true){
    bool checker;
    for(int i;i<N;i++){
      if(A[i]%2 == 0) A[i] = A[i]/2;
      else checker = false;
    }
    if(checker)break;
    else res++;
  }
}


Compiler output:
a.cc:4:16: error: expected identifier before ';' token
    4 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin >> N;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
#include <string>

using namespace;
int N;
int A[210];

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

  while(true){
    bool checker;
    for(int i;i<N;i++){
      if(A[i]%2 == 0) A[i] = A[i]/2;
      else checker = false
    }
    if(checker)break;
    else res++;
  }
}


Compiler output:
a.cc:4:16: error: expected identifier before ';' token
    4 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin >> N;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:17:27: error: expected ';' before '}' token
   17 |       else checker = false
      |                           ^
      |                           ;
   18 |     }
      |     ~
Language: Java

import java.util.Scanner;

public class Main2 {

	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 < A.length; i++) {
			A[i] = sc.nextInt();
		}

		int res = 0;

		while (true) {
			
			boolean existOdd = false;

			// check
			for (int i = 0; i < A.length; i++) {

				if (A[i] % 2 != 0) {
					existOdd = true;
					break;
				}
			}
			
			if (existOdd) {
				break;
			}

			// update
			for (int i = 0; i < A.length; i++) {
				A[i] = A[i] / 2;
			}
			
			res++;
		}
		
		System.out.println(res);
	}

}

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

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

int main(){
	int n,a[200],ans=0;
	cin >> n;
	
	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	
	bool flag = true;
	
	while(flag){
		for(int i = 0;i < n; i++){
			if(a[i] % 2 == 0) a[i] /= 2;
			else flag = false;
		}
		if(flag) ans++;
	}
	cout << ans << endl;
	
	return 0;
}

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

#include <stdio.h>
#include <string.h>

int main(void) {
    char s[200*16];
    char *tok;
    int nn;
    int n[200] = {};
    int i = 0;
    int flag = 0;
    int loop = 0;
    scanf("%d", &nn);
    scanf("%s", s);
    tok = strtok(s, " ");
    while (tok != NULL) {
        n[i] = atoi(tok);
        i++;
        tok = strtok(s, NULL);
    }
    while (1) {
        for (i = 0; i < nn; i++) {
            if (n[i]%2) {
                goto end;
            }
            n[i] /= 2;
        }
        loop++;
    }

 end:
    printf("%d\n", loop);
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'atoi' was not declared in this scope
   16 |         n[i] = atoi(tok);
      |                ^~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  int min;
  for (int i = 0; i < N; i++){
    int x;
    cin >> x;
    int j;
    for (j = 0; true; j++){
      if (x % 2 == 1)
        break;
      x /= 2;      
    }
    if (i == 0)
      min = j;
    if else (i != 0 && j < min)
      min = j;
  }
  cout << min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: expected '(' before 'else'
   19 |     if else (i != 0 && j < min)
      |        ^~~~
      |        (
Language: C++

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

int main() {
  int N;
  cin >> N;
  int min;
  for (int i = 0; i < N; i++){
    int x;
    cin >> x;
    int j;
    for (j = 0; true; j++){
      if (x % 2 == 1)
        break;
      x /= 2;      
    }
    if (i == 0)
      min = j;
    if else (i != 0 && j < min)
      min = j
  }
  cout << min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: expected '(' before 'else'
   19 |     if else (i != 0 && j < min)
      |        ^~~~
      |        (
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
  int a;
  cin >> a;
  string str_input;
  cin >> str_input;
  int offset = 0,cnt = 0, out_number[a];
  string temp;
  temp.clear();
  while(str_input[offset] == '0'){
   if(str_input[offset] == '') {
     out_number[cnt++] = stoi(temp);
     temp.clear();
   }
    else temp += str_input[offset];
    ++offset;
  }
  int ctrl_cnt = 0;
  bool odd_flg = false;
  while(!odd_flg){
 for(int i = 0; i < a; ++i){
   if(out_number[a] % 2 == 1)odd_flg = true;
   out_number[a] /= 2;
 }
    if(odd_flg == false)++ctrl_cnt;
  }
  cout << ctrl_cnt << endl;
  return 0;
}

Compiler output:
a.cc:15:28: error: empty character constant
   15 |    if(str_input[offset] == '') {
      |                            ^~
Language: C++

#include<iostream>
using namespace std;
 
int main() {
	int N, i, A[200], k,T = 0;
	cin >> N;
	for (i = 0; i < N; i++) {
		cin >> A[i];
	}
  
    while(true){
      bool odd = false;
      for(i = 0;i < N; i++){
        if(A[i]%2 != 0){
        odd = true
      }
      }
      
      if(odd = true){
      break;
      }
      
	 for (i = 0; i < N; i++) {
			A[i] = A[i] / 2;
		}  
  	k += 1;
	}
	cout << k << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: expected ';' before '}' token
   15 |         odd = true
      |                   ^
      |                   ;
   16 |       }
      |       ~
Language: C++

#include<iostream>
using namespace std;
 
int main() {
	int N, i, A[200], k,T = 0;
 
	cin >> N;
	for (i = 0; i < N; i++) {
		cin >> A[i];
	}
  
    while(for(i = 0; i < N; i++){
      if(A[i] % 2 == 0){
          T += 0;
          }else{
          T += 1;
      }
    }
          T == 0;
    ){
	 for (i = 0; i < N; i++) {
		if (A[i] % 2 == 0) {
			A[i] = A[i] / 2;
			k += 1;
			}
		}
	}
	cout << k / N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected primary-expression before 'for'
   12 |     while(for(i = 0; i < N; i++){
      |           ^~~
a.cc:12:11: error: expected ')' before 'for'
   12 |     while(for(i = 0; i < N; i++){
      |          ~^~~
      |           )
a.cc:20:5: error: expected primary-expression before ')' token
   20 |     ){
      |     ^
Language: C++

#include<iostream>
using namespace std;

int main() {
	int N, i, A[200], k,T;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected primary-expression before 'for'
   11 |     while(for(i = 0; i < N; i++){
      |           ^~~
a.cc:11:11: error: expected ')' before 'for'
   11 |     while(for(i = 0; i < N; i++){
      |          ~^~~
      |           )
a.cc:19:5: error: expected primary-expression before ')' token
   19 |     ){
      |     ^
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <functional>
#include <limits.h>
#include <set>
#include <map>
#include <tuple>
using namespace std;

#define ll long long
#define ull unsigned long long
#define rep(i,N) for (ll i=0;i<N;i++)
#define loop(i,N,M) for(ll i=N;i<M;i++)
#define MAX(v) *max_element(v.begin(),v.end())
#define MIN(v) *min_element(v.begin(),v.end())
#define SORTL2S(type,v) sort(v.begin(),v.end(),greater<type>())
#define SORTS2L(type,v) sort(v.begin(),v.end())
#define SORTMF(v,func) sort(v.begin(),v.end(),func)

ll debugFlag = false;

template<typename T>
void debug(T& obj) {
	debug(obj, true);
}

template<typename T>
void debug(T& obj, bool lnFlag) {
	if (!debugFlag) return;
	cout << obj;
	if (lnFlag) cout << endl;
}

template<typename T>
void debug(vector<T>& val) {
	debug(val, true);
}

template<typename T>
void debug(vector<T>& val, bool lnFlag) {
	if (!debugFlag) return;
	cout << "[";
	rep(i, val.size()) {
		if (i != 0) cout << ",";
		debug(val[i], false);
	}
	cout << "]";
	if (lnFlag) cout << endl;
}

template<typename T, typename U>
void debug(pair<T, U>& val) {
	debug(val, true);
}

template<typename T, typename U>
void debug(pair<T, U>& val, bool lnFlag) {
	if (!debugFlag) return;
	cout << "(";
	debug(val.first, false);
	cout << ",";
	debug(val.second, false);
	cout << ")";
	if (lnFlag) cout << endl;
}

ll N;

void solve() {
	cin >> N;

	ll bin = 0;
	rep(i, N) {
		ll input;
		cin >> input;
		bin |= input;
		debug(bin);
	}

	ll ans = 0;
	while (1) {
		if (bin & 1 == 1) break;
		ans++;
		bin >>= 1;
	}

	cout << ans;

}

int main(int argc, char* argv[]) {
	if (argc == 2 && string(argv[1]) == "debug") debugFlag = true;
	solve();
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In instantiation of 'void debug(T&) [with T = long long int]':
a.cc:83:8:   required from here
   83 |                 debug(bin);
      |                 ~~~~~^~~~~
a.cc:30:14: error: no matching function for call to 'debug(long long int&, bool)'
   30 |         debug(obj, true);
      |         ~~~~~^~~~~~~~~~~
a.cc:29:6: note: candidate: 'template<class T> void debug(T&)'
   29 | void debug(T& obj) {
      |      ^~~~~
a.cc:29:6: note:   candidate expects 1 argument, 2 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int count = 0;
  cin >> N;
  for (int i = 2; i > 0; i**) {
   for (int j = 0; j < N; j++;) {
     int a;
     cin >> a;
     if(!(a%2 == 0)){break;}
     if(j == N){count++;}
   }
  cout << count << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: expected primary-expression before ')' token
    8 |   for (int i = 2; i > 0; i**) {
      |                             ^
a.cc:9:30: error: expected ')' before ';' token
    9 |    for (int j = 0; j < N; j++;) {
      |        ~                     ^
      |                              )
a.cc:9:31: error: expected primary-expression before ')' token
    9 |    for (int j = 0; j < N; j++;) {
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int count = 0;
  cin >> N;
  for (int i = 2; i > 0; i**) {
   for (int j = 0; j < N; j++) {
     int a;
     cin >> a;
     if(!(a%2 == 0)){break;}
     if(j == N){count++;}
   }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: expected primary-expression before ')' token
    8 |   for (int i = 2; i > 0; i**) {
      |                             ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <stdio.h>
#include <vector>
#include <algorithm>
#include <string>
#include <iostream>
#define rep(i,n) for(int i = 0; i <(n); i++)
using namespace std;

int main(void) {
	int N, i, cnt = 0,tmp,sum = 0;
	scanf("%d", &N);
	rep(i, N) {
		scanf("%d", &tmp);
		if ((tmp & 1) == 1) {
			printf("%d", cnt);
			return;
		}
		sum += tmp;
	}
	if ((sum & 1) == 1) {//奇数なら
		printf("%d", cnt);
	}
	else {
		do{
			cnt++;
			sum /= 2;
		} while ((sum & 1) == 0);
		printf("%d", cnt);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |                         return;
      |                         ^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>

using namespace std;


int main() {
	int a,N; cin >> N;
	vector<int> b(N);
	for (int i = 0; i < N; i++) {
		cin >> a;
		int count = 0;
		while (a % 2 == 0) {
			b[i]++;
			a = a / 2;
		}
	}
	int mins= INT_MAX;
	for (int j = 0; j <N; j++) {
		mins = min(mins, b[j]);
	}
	
	cout << mins << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: 'INT_MAX' was not declared in this scope
   20 |         int mins= INT_MAX;
      |                   ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <vector>
  +++ |+#include <climits>
    5 |
Language: C

#include <stdio.h>

int main(){
  int len;
  scanf("%d",&len);
  
  int num[len]
  int *p;
  p = &num[0];
  
  int i;
  int count=0;
  for(i=0;i < len;i++){
    scanf("%d",p[i]);

  }
  
  while(1){
    for(i=0;i < len;i++){
      if(*p[i]%2 == 1){
        printf("%d",count);
      	return 0;
      }
      *p[i] = *p[i]/2;
    }
    count++;
  }
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:7:15: error: expected ';' before 'int'
    7 |   int num[len]
      |               ^
      |               ;
    8 |   int *p;
      |   ~~~          
main.c:9:8: error: 'num' undeclared (first use in this function)
    9 |   p = &num[0];
      |        ^~~
main.c:9:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:10: error: invalid type argument of unary '*' (have 'int')
   20 |       if(*p[i]%2 == 1){
      |          ^~~~~
main.c:24:7: error: invalid type argument of unary '*' (have 'int')
   24 |       *p[i] = *p[i]/2;
      |       ^~~~~
main.c:24:15: error: invalid type argument of unary '*' (have 'int')
   24 |       *p[i] = *p[i]/2;
      |               ^~~~~
Language: C++

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

int main(){
  int n, count, maxcount;
  cin >> n;
  count = 0;
  maxcount = 100;
  for(int i = 0; i < n; i++){
    int a;
    cin >> a;
    for(; a % 2 == 0; a / 2){
      count++;
    }
    if(maxcount > count){
      maxcount = count;
    }
    count = 0
  }
  cout << maxcount <<endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: expected ';' before '}' token
   18 |     count = 0
      |              ^
      |              ;
   19 |   }
      |   ~
Language: C++

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

int main(){
  int n, count, maxcount;
  cin >> n;
  count = 0;
  maxcount = 500;
  for(int i = 0; i < n; i++){
    int a;
    cin >> a;
    for(count = 0, a % 2 == 0, a / 2){
      count++;
    }
    if(maxcount > count){
      maxcount = count;
    }
  }
  cout << maxcount <<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:12:37: error: expected ';' before ')' token
   12 |     for(count = 0, a % 2 == 0, a / 2){
      |                                     ^
      |                                     ;
a.cc:15:5: error: expected primary-expression before 'if'
   15 |     if(maxcount > count){
      |     ^~
a.cc:14:6: error: expected ';' before 'if'
   14 |     }
      |      ^
      |      ;
   15 |     if(maxcount > count){
      |     ~~
a.cc:15:5: error: expected primary-expression before 'if'
   15 |     if(maxcount > count){
      |     ^~
a.cc:14:6: error: expected ')' before 'if'
   14 |     }
      |      ^
      |      )
   15 |     if(maxcount > count){
      |     ~~
a.cc:12:8: note: to match this '('
   12 |     for(count = 0, a % 2 == 0, a / 2){
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int N, A, division, count;
  cin >> N;
  count = 0;
  
  for (int i = 1;; i++)
  {
    division = 2 * i;
    
    for (int j = 1 ; j <= N ; j++ )
    {
      cin >> number;
      A = number;
      
      if ( A % division != 0)
        break;
    }
    
     if ( A % division != 0)
        break;
    
    count++;
  }
  
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: 'number' was not declared in this scope
   16 |       cin >> number;
      |              ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,A;
  cin>>N>>A;
  int sum=0;
  int u=0;
  
  while(1){
    for(int i=1;i<=N;i++){
      if(A%2=0){
        A/=2;
      }
      else{
        u++;
        break;
      }
    }
    if(u==0){
      sum++;
    }
    else{
      break;
    }
  }
  cout<<sum<<endl;
}
        


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: lvalue required as left operand of assignment
   11 |       if(A%2=0){
      |          ~^~
Language: C++

#include <bits/stdc++.>
using namespace std;
int main(){
  int N,A;
  cin>>N>>A;
  int sum=0;
  int u=0;
  
  while(1){
    for(int i=1;i<=N;i++){
      if(A%2=0){
        A/=2;
      }
      else{
        u++;
        break;
      }
    }
    if(u==0){
      sum++;
    }
    else{
      break;
    }
  }
  cout<<sum<<endl;
}
        

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

#include <iostream>
#include <vector>

using namespace std;

long long int euclid(long long int x, long long int y){
  long long int t;
  t = max(x,y);
  x = min(x,y);
  y = t;
  long long int r = x % y;
  long long int tmp;
  
  while(r != 0){
    tmp = r;
    r = y % r;
    y = tmp;
  }
  return tmp;
}

int mylog2(long long int n){
  int cnt = 0;
  while(n != 0){
    if(n % 2 != 0) break;
    n /= 2;
    cnt++;
  }
  return cnt;
}

int main(){
  int N;
  cin >> N;
  if(N == 1){
    int a;
    cin >> a;
    cout << mylog2(a);
    break;
  }
  vector<long long int> V(N);
  for(int i = 0; i < N; i++){
    cin >> V[i];
  }
  long long int tmp = euclid(V[0], V[1]);
  //cout << tmp << " ";
  for(int i = 1; i < N-1; i++){
    tmp = euclid(tmp, V[i+1]);
    //cout << tmp << " ";
  }
  cout << mylog2(tmp);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:5: error: break statement not within loop or switch
   39 |     break;
      |     ^~~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

long long int euclid(long long int x, long long int y){
  long long int t;
  t = max(x,y);
  x = min(x,y);
  y = t;
  long long int r = x % y;
  long long int tmp;
  
  while(r != 0){
    tmp = r;
    r = y % r;
    y = tmp;
  }
  return tmp;
}

int mylog2(long long int n){
  int cnt = 0;
  while(n != 0){
    if(n % 2 != 0) break;
    n /= 2;
    cnt++;
  }
  return cnt;
}

int main(){
  int N;
  cin >> N;
  if(N == 1){
    int a;
    cin >> a;
    cout << mylog2(a);
    break;
  }
  vector<long long int> V(N);
  for(int i = 0; i < N; i++){
    cin >> V[i];
  }
  long long int tmp = euclid(V[0], V[1]);
  cout << tmp << " ";
  for(int i = 1; i < N-1; i++){
    tmp = euclid(tmp, V[i+1]);
    cout << tmp << " ";
  }
  cout << mylog2(tmp);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:5: error: break statement not within loop or switch
   39 |     break;
      |     ^~~~~
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 bit = 0;
        for (int i=0; i<N; i++) {
            bit |= sc.nextInt();
        }
        System.out.println(integer.numberOfTrailingZeros(bit));
    }
}


Compiler output:
Main.java:10: error: cannot find symbol
        System.out.println(integer.numberOfTrailingZeros(bit));
                           ^
  symbol:   variable integer
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int manin(){
  int n;
  cin>>n;
  int a[210];
  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;  // 奇数があったら break

        // 操作を行えるなら操作を実際に行う
        for (int i = 0; i < N; ++i) {
            A[i] /= 2;
        }
        ++res;  // 操作回数をインクリメント
    }

    cout << res << endl;
}

Compiler output:
a.cc: In function 'int manin()':
a.cc:11:25: error: 'N' was not declared in this scope
   11 |     for (int i = 0; i < N; ++i) {
      |                         ^
a.cc:12:17: error: 'A' was not declared in this scope
   12 |             if (A[i] % 2 != 0) exist_odd = true;  // 奇数があったらフラグを立てる
      |                 ^
a.cc:18:29: error: 'N' was not declared in this scope
   18 |         for (int i = 0; i < N; ++i) {
      |                             ^
a.cc:19:13: error: 'A' was not declared in this scope
   19 |             A[i] /= 2;
      |             ^
a.cc:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
   25 | }
      | ^
Language: Java

import java.util.Scanner;
public class Main {
  public static int helper(String[] dataArr) {
    int minCount = 0;
    for (String number : dataArr) {
      int num = Integer.parseInt(number);
      int count;
      while (num % 2 == 0 && count < minCount) {
        count++;
      }
      minCount = count;
      if (minCount == 0) return 0;
    }
    return minCount;
  }
  
  public static void main(String[] args) {
    Scanner dataScanner = new Scanner(System.in);
    dataScanner.nextLine();
    String data = dataScanner.nextLine();
    String[] dataArr = data.split(" ");
    int toOut = helper(dataArr);
    System.out.println(toOut);
  }
}


Compiler output:
Main.java:8: error: variable count might not have been initialized
      while (num % 2 == 0 && count < minCount) {
                             ^
Main.java:11: error: variable count might not have been initialized
      minCount = count;
                 ^
2 errors
Language: Java

import java.util.Scanner;
public class Main {
  public int helper(String[] dataArr) {
    int minCount = 0;
    for (String number : dataArr) {
      int num = Integer.parseInt(number);
      int count;
      while (num % 2 == 0 && count < minCount) {
        count++;
      }
      minCount = count;
      if (minCount == 0) return 0;
    }
    return minCount;
  }
  
  public static void main(String[] args) {
    Scanner dataScanner = new Scanner(System.in);
    dataScanner.nextLine();
    String data = dataScanner.nextLine();
    String[] dataArr = data.split(" ");
    int toOut = helper(dataArr);
    System.out.println(toOut);
  }
}


Compiler output:
Main.java:22: error: non-static method helper(String[]) cannot be referenced from a static context
    int toOut = helper(dataArr);
                ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
  public int helper(String[] dataArr) {
    int minCount = 0;
    for (String number : dataArr) {
      int num = Integer.parseInt(number);
      int count;
      while (num % 2 == 0 && count < minCount) {
        count++;
      }
      minCount = count;
      if (minCount == 0) return 0;
    }
    return minCount;
  }
  
  public static void main(String[] args) {
    Scanner dataScanner = new Scanner(System.in);
    dataScanner.nextLine();
    String data = dataScanner.nextLine();
    String[] dataArr = data.split(" ");
    int toOut = helpter(dataArr);
    System.out.println(toOut);
  }
}


Compiler output:
Main.java:22: error: cannot find symbol
    int toOut = helpter(dataArr);
                ^
  symbol:   method helpter(String[])
  location: class Main
1 error
Language: C++

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

int main(){
  int N;
  cin >> N;
  int A,cnt=0,cntmin=0;
  for(int i = 0; i < N; ++i){
    cnt = 0;
    cin >> A;
    while((A%2) == 0){
      cnt++;
      A /= 2;
    }
    cntmax = min(cnt,cntmin);
  }
  cout << cntmin << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'cntmax' was not declared in this scope; did you mean 'cntmin'?
   15 |     cntmax = min(cnt,cntmin);
      |     ^~~~~~
      |     cntmin
Language: C++

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

int main(){
  int N;
  cin >> N;
  int A,cnt=0;
  int waru = 2;
  bool flag = 1;
  while(flag){
    for(int i = 0; i < N; ++i){
      cin >> A;
      if(A%waru != 0){
        frag = 0;
        break;
      }
      cnt++;
      waru *= 2;
    }
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'frag' was not declared in this scope; did you mean 'flag'?
   14 |         frag = 0;
      |         ^~~~
      |         flag
Language: C++

#include <iostream>
using namespace

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 exit_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;
            }
      }

cout << res << endl; 
      
}

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int N;
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int N;
      | ~~~             
a.cc: In function 'int main()':
a.cc:8:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |       cin >> N;
      |       ^~~
      |       std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:38: error: 'exist_odd' was not declared in this scope; did you mean 'exit_odd'?
   16 |                   if (A[i] % 2 != 0) exist_odd = true;
      |                                      ^~~~~~~~~
      |                                      exit_odd
a.cc:19:17: error: 'exist_odd' was not declared in this scope; did you mean 'exit_odd'?
   19 |             if (exist_odd) break;
      |                 ^~~~~~~~~
      |                 exit_odd
a.cc:26:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 | cout << res << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 | cout << res << endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: 'i' was not declared in this scope
   16 |       if (vec.at(i) % 2 == 1) {
      |                  ^
a.cc:24:16: error: 'i' was not declared in this scope
   24 |         vec.at(i) /= 2;
      |                ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |   ans = 0;
      |   ^~~
      |   abs
a.cc:16:18: error: 'i' was not declared in this scope
   16 |       if (vec.at(i) % 2 == 1) {
      |                  ^
a.cc:24:16: error: 'i' was not declared in this scope
   24 |         vec.at(i) /= 2;
      |                ^
Language: C++

#include <iostream>
using namespace std;

int N;
int A[210];         // 最大 200 個なので余裕を持って 210 に --- 200 以上ならなんでもよいです

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 = true;  // 奇数があったらフラグを立てる
        }

        if (exist_odd) break;  // 奇数があったら break

        // 操作を行えるなら操作を実際に行う
        for (int i = 0; i < N; ++i) {
            A[i] /= 2;
        }
        ++res;  // 操作回数をインクリメント
    }

    cout << res << endl;
}
}

Compiler output:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  int a[220];
  for(int i = 0; i < n; ++i) cin >> a[i];
  
  int res = 0;
  
  while(true){
    bool odd = false;
    if(a[i]%2 != 0) odd = true;
    if(odd) break;
    
    for(int i = 0; i < n; ++i){
      a[i] /= 2;
    }
    ++res;
  }
  
  cout << res << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 'i' was not declared in this scope
   14 |     if(a[i]%2 != 0) odd = true;
      |          ^
Language: C++

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

#define ll long long
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define fore(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define forr(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define IOS ios::sync_with_stdio(false); cin.tie(nullptr);

const int N = 1e5+5;
int a[N];

int fun(int n){
	int cnt = 0;
	while(n%2 == 0){
		cnt++;
	}
	return cnt;
}

int32_t main(){
	IOS;
	cout.precision(10);
    cout << fixed;
	int n;
	cin >> n ;
	forn(i,n){
		cin >> a[i];
	}
	int cnt = 0;
	for(i,n){
		cnt += fun(a[i]);
	}
	cout << cnt;

		
 	return 0;
 }

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:37:13: error: 'i' was not declared in this scope
   37 |         for(i,n){
      |             ^
a.cc:43:9: error: expected primary-expression before 'return'
   43 |         return 0;
      |         ^~~~~~
a.cc:40:21: error: expected ')' before 'return'
   40 |         cout << cnt;
      |                     ^
      |                     )
......
   43 |         return 0;
      |         ~~~~~~       
a.cc:37:12: note: to match this '('
   37 |         for(i,n){
      |            ^
Language: Java

import java.util.Scanner;

public class ABC081B {
	public static void main (String[] arg) {
		Scanner scan = new Scanner(System.in);
		int ope_cnt = 0;
		boolean break_flag = false;
		
		int num_number = scan.nextInt();
		String[] input = scan.nextLine().split(" ");
		int[] input_int = new int[num_number];
		
		for(int i = 0; i < num_number; i++) {
			input_int[i] = Integer.parseInt(input[i]);
		}
		
		int[] output_int = input_int; 
		while (true) {
			for (int i = 0; i < num_number; i++ ) {
				if (output_int[i] % 2 == 0) {
					output_int[i] /= 2; 
				} else {
					break_flag = true;
					break;
				}
			}
			if (break_flag == true) {break;}
			ope_cnt += 1;
		}
		
		System.out.println(ope_cnt);
		scan.close();
	}
}


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

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

int t = MAX_INT;

int recur(int n,int c){
  if (c > t){
    return c;
  }
  if (n%2 == 0){
    return recur(n/2,c+1);
  }else{
    return c;
  }
}

int main(){
  int n;
  cin >> n;
  for (int i=0;i<n;i++){
    int a;
    cin >> a;
    int c;
    c = recur(a,0);
    if (c < t){
      t = c;
    }
  }
  cout << t << endl;
  return 0;
}



Compiler output:
a.cc:4:9: error: 'MAX_INT' was not declared in this scope; did you mean 'MAX_INPUT'?
    4 | int t = MAX_INT;
      |         ^~~~~~~
      |         MAX_INPUT
Language: C++

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

int main(){
  int n; cin>>n;
  vector<int> a(n);
  for(int i=0;i<n;i++){
    cin>>a[i];
  }
  
  bool ok=true;
  while(ok){
    int cnt=0;
    for(int i=0;i<n;i++){
      if(a[i]%2!=0){
        ok=false;
        break;
      }
    }
    cnt++;
  }
  cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   22 |   cout<<cnt<<endl;
      |         ^~~
      |         int
Language: C++

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

int main() {
int N , A;
  cin >> N;
  
for( j = 0; true; j++){  
for( i = 0; i < N; i++){
  cin >> A;
  A %= 2;
    }
  if(A % 2 == 1){
    cout << j - 1;
    break;
    }              
  }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: 'j' was not declared in this scope
    8 | for( j = 0; true; j++){
      |      ^
a.cc:9:6: error: 'i' was not declared in this scope
    9 | for( i = 0; i < N; i++){
      |      ^
Language: C

#include <iostream>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
using namespace std;
int n;
int p[] = {};
void inputArray(int * p, int a){
    rep(i, a){
        cin >> p[i];
    }
};
int main(){
    cin >> n;
    inputArray(p,n);
    int counter = 0;
    bool frag = true;
    while(frag){
        for(int i = 0; i < n; i++){
            if(p[i]%2 == 0){
                p[i] /= 2;
            }else{
                frag = false;
            }
        }
        if(frag) counter++;
    }
    cout << counter << endl;
    return 0;
}

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

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

int main(){
	int n;
	cin >> n;
	
	int anko = 0;
	
	vector<int> a(n);
	
	for(int i = 0; i < n; ++i){
		cin >> a.at(i);
	}
		
	while(true){
		bool odd = false;
		for(int i = 0; i < n; ++i){
			if(a.at(i) % 2 != 0){
				odd = true;


Compiler output:
a.cc: In function 'int main()':
a.cc:20:44: error: expected '}' at end of input
   20 |                                 odd = true;
      |                                            ^
a.cc:19:45: note: to match this '{'
   19 |                         if(a.at(i) % 2 != 0){
      |                                             ^
a.cc:20:44: error: expected '}' at end of input
   20 |                                 odd = true;
      |                                            ^
a.cc:18:43: note: to match this '{'
   18 |                 for(int i = 0; i < n; ++i){
      |                                           ^
a.cc:20:44: error: expected '}' at end of input
   20 |                                 odd = true;
      |                                            ^
a.cc:16:20: note: to match this '{'
   16 |         while(true){
      |                    ^
a.cc:20:44: error: expected '}' at end of input
   20 |                                 odd = true;
      |                                            ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

const long long MAX = 1e9;

int N;
vector<int> a_list;

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

  int all_or = a_list[0];
  for(int i=0;i<N;i++) {
    all_or |= a_list[i];
  }
  cout << bitset<20>(all_or) << "\n";
  if (all_or==0) {
    cout << "0\n";
    return 0;
  }
  for (int i=0;i<MAX;i++){
    if (all_or & (1<<i)){
      cout << i << "\n";
      break;
    }
  }


#if 0
  cout << N << "\n";
  for(auto s: a_list) cout << s << " "; 
  cout << "\n";
#endif
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: 'bitset' was not declared in this scope
   19 |   cout << bitset<20>(all_or) << "\n";
      |           ^~~~~~
a.cc:3:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
    2 | #include <vector>
  +++ |+#include <bitset>
    3 | using namespace std;
a.cc:19:30: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   19 |   cout << bitset<20>(all_or) << "\n";
      |                     ~~~~~~~~ ^~ ~~~~
      |                      |          |
      |                      int        const char [2]
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: expected primary-expression before '>>' token
   23 |         A.at(i) =>> 1;
      |                  ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[200];
  for(int i=0;i<n;i++){
    cin >> a[i];
  }
  int count = 0;
  flag = 0;
  while(1){
    for(int i=0;i<n;i++){
      if(a[i] % 2 == 0){
        a[i] /= 2;
      }else{
        flag = 1;
        break;
      }
    }
    if(flag == 0){
      count++;
    }else{
      break;
    }
  }
  cout << count;
}

    


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[200];
  for(int i=0;i<n;i++){
    cin >> a[i];
  }
  int count = 0;
  flag == 0;
  while(1){
    for(int i=0;i<n;i++){
      if(a[i] % 2 == 0){
        a[i] /= 2;
      }else{
        flag == 1;
        break;
      }
    }
    if(flag == 0){
      count++;
    }else{
      break;
    }
  }
  cout << count;
}

    

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

#include <iostream>
#include <algorithm>
#include <map>
#include <string>

using namespace std;
 
int main(void){
	
	int N, ,count, count2=0;
	
	cin >> N;
	
	int A[N];
	
	for(int i=0; i<N; i++)
		cin >> A[i];
	
	for(int i=0; i<N; i++){
		count = 0;
		for(int j=0; i<N; j++){
			if(A[j]%2 == 0){
				count++;
				A[j] /= 2;
			}else
				break;
		}
		if(count == N){
			count2++;
		}
	}
	
	cout << count2;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected unqualified-id before ',' token
   10 |         int N, ,count, count2=0;
      |                ^
Language: C++

#include<iostream>
using namespace std;

int n;
int [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:5:6: error: expected identifier before numeric constant
    5 | int [210];
      |      ^~~
a.cc:5:6: error: expected ']' before numeric constant
    5 | int [210];
      |      ^~~
      |      ]
a.cc:5:5: error: structured binding declaration cannot have type 'int'
    5 | int [210];
      |     ^
a.cc:5:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:5:5: error: empty structured binding declaration
a.cc:5:10: error: expected initializer before ';' token
    5 | int [210];
      |          ^
a.cc: In function 'int main()':
a.cc:9:31: error: 'a' was not declared in this scope
    9 |   for(int i=0;i<n;i++) cin >> a[i];
      |                               ^
a.cc:16:10: error: 'a' was not declared in this scope
   16 |       if(a[i]%2 != 0 exist_odd = true;
      |          ^
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:16:39: error: expected ')' before '}' token
   16 |       if(a[i]%2 != 0 exist_odd = true;
      |         ~                             ^
      |                                       )
   17 |     }
      |     ~                                  
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:22:7: error: 'a' was not declared in this scope
   22 |       a[i] /= 2;
      |       ^
a.cc:24:10: error: expected ';' before '}' token
   24 |     res++
      |          ^
      |          ;
   25 |   }
      |   ~
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 == 1) odd = true;
    }
    if(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:26: error: expected ')' before ';' token
    7 |   for(int i = 0;i < N;i++;) cin >> a[i];
      |      ~                   ^
      |                          )
a.cc:7:27: error: expected primary-expression before ')' token
    7 |   for(int i = 0;i < N;i++;) cin >> a[i];
      |                           ^
a.cc:11:14: error: expected initializer before '==' token
   11 |     bool odd == false;
      |              ^~
a.cc:13:25: error: 'odd' was not declared in this scope
   13 |       if(a[i] % 2 == 1) odd = true;
      |                         ^~~
a.cc:15:8: error: 'odd' was not declared in this scope
   15 |     if(odd) break;
      |        ^~~
Language: C++

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

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

    int dmin = 100;
    for(int i = 0; i < N; i++){
            int d = 0;
            while(a[i] % 2 == 0){
                a[i] /= 2;
                d++;
            }
            dmin = min(dmin, d);
        }
    }

    cout << dmin << endl;
}

Compiler output:
a.cc:23:5: error: 'cout' does not name a type
   23 |     cout << dmin << endl;
      |     ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

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

    int dmin = 100;
    for(int i = 0; i < N; i++){
        if(a[i] % 2 == 0){
            int a; 
            int d = 0;
            while(a % 2 == 0){
                a /= 2;
                d++;
            }
            dmin = min(dmin, d);
        }
    }

    cout << d << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: 'd' was not declared in this scope
   25 |     cout << d << endl;
      |             ^
Language: C++

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



int split(int x){
	if(x%2==1){
		retern 0;
	}else{
		retern x /2;
	}
}



int main(){
	//int a;
	int count =0;
	int n;
	cin>>n;
	vector<int> a;
	int endflg =0;


	// atを使って1つずつ入力
	for(int i=0;i<n;i++){
		cin >> a.at(i);
	}

	for(int j =0;j<11;j++){

		for(int i=0;i<n;i++){
			if(split(a.at(i)) != 0){
			a.at(i) = split(a.at(i));
			}else{
				endflg = 1;
			}
		}
	
		if(endflg = 0){
			++count;
		}else{
			break;
		}
		

	}
	
	cout<<count;
	
}


Compiler output:
a.cc: In function 'int split(int)':
a.cc:8:17: error: 'retern' was not declared in this scope; did you mean 'extern'?
    8 |                 retern 0;
      |                 ^~~~~~
      |                 extern
a.cc:10:17: error: 'retern' was not declared in this scope; did you mean 'extern'?
   10 |                 retern x /2;
      |                 ^~~~~~
      |                 extern
a.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^
Language: C++

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

int main(){
	//int a;
	int count =0;
	int n;
	cin>>n;
	vector<int> a;
	int endflg =0;

	
int split(int x){
	if(x%2==1){
		retern 0;
	}else{
		retern x /2;
	}
}



	

	// atを使って1つずつ入力
	for(int i=0;i<n;i++){
		cin >> a.at(i);
	}

	for(int j =0;j<11;j++){

		for(int i=0;i<n;i++){
			if(split(a.at(i)) != 0){
			a.at(i) = split(a.at(i));
			}else{
				endflg = 1;
			}
		}
	
		if(endflg = 0){
			++count;
		}else{
			break;
		}
		

	}
	
	cout<<count;
	
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: a function-definition is not allowed here before '{' token
   13 | int split(int x){
      |                 ^
a.cc:33:28: error: 'split' was not declared in this scope
   33 |                         if(split(a.at(i)) != 0){
      |                            ^~~~~
Language: C++

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

int main(){
	//int a;
	int count =0;
	int n;
	cin>>n;
	vector<int> a;
	int endflg =0;

	

	// atを使って1つずつ入力
	for(int i=0;i<n;i++){
		cin >> a.at(i);
	}

	for(int j =0;j<11;j++){

		for(int i=0;i<n;i++){
			if(split(a.at(i)) != 0){
			a.at(i) = split(a.at(i));
			}else{
				endflg = 1;
			}
		}
	
		if(endflg = 0){
			++count;
		}else{
			break;
		}
		

	}
	
	cout<<count;
	
}

int split(int x){
	if(x%2==1){
		retern 0;
	}else{
		retern x /2;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: 'split' was not declared in this scope
   22 |                         if(split(a.at(i)) != 0){
      |                            ^~~~~
a.cc: In function 'int split(int)':
a.cc:44:17: error: 'retern' was not declared in this scope; did you mean 'extern'?
   44 |                 retern 0;
      |                 ^~~~~~
      |                 extern
a.cc:46:17: error: 'retern' was not declared in this scope; did you mean 'extern'?
   46 |                 retern x /2;
      |                 ^~~~~~
      |                 extern
a.cc:48:1: warning: no return statement in function returning non-void [-Wreturn-type]
   48 | }
      | ^
Language: C++

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

int main(){
	//int a;
	int count =0;
	int n
	cin>>n;
	vector<int> a;
	int endflg =0;

	

	// atを使って1つずつ入力
	for(int i=0;i<n;i++){
		cin >> a.at(i);
	}

	for(int j =0;j<11;j++){

		for(int i=0;i<n;i++){
			if(split(a.at(i)) != 0){
			a.at(i) = split(a.at(i));
			}else{
				endflg = 1;
			}
		}
	
		if(endflg = 0){
			++count;
		}else{
			break;
		}
		

	}
	
	cout<<count;
	
}

int split(int x){
	if(x%2==1){
		retern 0;
	}else{
		retern x /2;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected initializer before 'cin'
    8 |         cin>>n;
      |         ^~~
a.cc:15:23: error: 'n' was not declared in this scope
   15 |         for(int i=0;i<n;i++){
      |                       ^
a.cc:21:31: error: 'n' was not declared in this scope
   21 |                 for(int i=0;i<n;i++){
      |                               ^
a.cc:22:28: error: 'split' was not declared in this scope
   22 |                         if(split(a.at(i)) != 0){
      |                            ^~~~~
a.cc: In function 'int split(int)':
a.cc:44:17: error: 'retern' was not declared in this scope; did you mean 'extern'?
   44 |                 retern 0;
      |                 ^~~~~~
      |                 extern
a.cc:46:17: error: 'retern' was not declared in this scope; did you mean 'extern'?
   46 |                 retern x /2;
      |                 ^~~~~~
      |                 extern
a.cc:48:1: warning: no return statement in function returning non-void [-Wreturn-type]
   48 | }
      | ^