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

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

int main(){
	int N;
  cin >>N;
  int res=0;
  for (int i=1;i<=N;i++){
    int cnt=0;
    int j=i;
    
    while(true){
      if(j%2==0){
        j/=2;
        cnt++;
      }else{
        break;
      }
      if(res<cnt)res=cnt;
    }
    cout <<res<<endl;
}

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

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

int main(){
	int N;
  cin >>N;
  int res=0
  for (int i=1;i<=N;i++){
    int cnt=0;
    int j=i;
    
    while(true){
      if(j%2==0){
        j/=2;
        cnt++;
      }else{
        break;
      }
      if(res<cnt)res=cnt;
    }
    cout <<res<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (int i=1;i<=N;i++){
      |   ^~~
a.cc:9:16: error: 'i' was not declared in this scope
    9 |   for (int i=1;i<=N;i++){
      |                ^
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
	int N;
  cin >>N;
  int res=0
  for (int i=0;i<N;i++){
    int cnt=0;
    int j=i;
    while(true){
      if(j%2==0){
        j/=2;
        cnt++;
      }else{
        break;
      }
      if(res<cnt)res=cnt;
    }
    cout <<res<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (int i=0;i<N;i++){
      |   ^~~
a.cc:9:16: error: 'i' was not declared in this scope
    9 |   for (int i=0;i<N;i++){
      |                ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a;cin>>a;
  for(int i=1;i<=a;i=i*2);
  cout<<i<<endl;}

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

#include <iostream>
using namespace std;

int main() {
    int N;
    cin >> N;
    int max = 0;
    for (int i = 1; i <= N; ++i) {
        bool can = true;
        int number = i;
        int count = 0;
        while(can) {
            if (number % 2 == 0) {
                number /= 2;
                ++count;
            }
            else {
                can = false;
                if (count > max) {
                    res = i;
                }
            }
        }
    }
    cout << res << endl;
}


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

#include<iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
 
/*struct*/
struct aaa{
    aaa(){
        cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
    };
}aaaaaaa;
 
 
int N, A[200];
 
 
 
int main()
{
	int dmin = 1000;
	cin >> N;
	for (int i = 0; i < N; ++i) {
		int A;
		cin >> A;
		int d = 0;
		while (A % 2 == 0) {
			A /= 2;
			++d;
		}
		dmin = min(dmin, d);
	}
	cout << dmin;
	return 0;
}

Compiler output:
a.cc: In constructor 'aaa::aaa()':
a.cc:9:59: error: 'setprecision' was not declared in this scope
    9 |         cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
      |                                                           ^~~~~~~~~~~~
a.cc:4:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    3 | #include <algorithm>
  +++ |+#include <iomanip>
    4 | using namespace std;
Language: C++

#include <cstdio>
#include <algorithm>
using namespace std;

/*struct*/
struct aaa{
    aaa(){
        cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
    };
}aaaaaaa;


int N, A[200];


 
int main()
{
	int dmin = 1000;
	cin >> N;
	for (int i = 0; i < N; ++i) {
		int A;
		cin >> A;
		int d = 0;
		while (A % 2 == 0) {
			A /= 2;
			++d;
		}
		dmin = min(dmin, d);
	}
	cout << dmin;
	return 0;
}


Compiler output:
a.cc: In constructor 'aaa::aaa()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:8:21: error: 'ios' has not been declared
    8 |         cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
      |                     ^~~
a.cc:8:46: error: 'cout' was not declared in this scope
    8 |         cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
      |                                              ^~~~
a.cc:8:46: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:52: error: 'fixed' was not declared in this scope
    8 |         cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
      |                                                    ^~~~~
a.cc:3:1: note: 'std::fixed' is defined in header '<ios>'; this is probably fixable by adding '#include <ios>'
    2 | #include <algorithm>
  +++ |+#include <ios>
    3 | using namespace std;
a.cc:8:59: error: 'setprecision' was not declared in this scope
    8 |         cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
      |                                                           ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    2 | #include <algorithm>
  +++ |+#include <iomanip>
    3 | using namespace std;
a.cc: In function 'int main()':
a.cc:20:9: error: 'cin' was not declared in this scope
   20 |         cin >> N;
      |         ^~~
a.cc:20:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:9: error: 'cout' was not declared in this scope
   31 |         cout << dmin;
      |         ^~~~
a.cc:31:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<string>
#include<vector>
#include<list>
#include<set>
#include<cctype>
#define ld long double
#define ll long long int
#define ull unsigned long long int
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const long long INF=1LL<<60;


int main(void){
	ios::sync_with_stdio(false); cin.tie(0);
	
	a[]={64,32,16,8,4,2,1};
	int n,i;
	cin>>n;
	for(i=0;i<7;i++){
		if(a[i]<=n){
			cout<<a[i]<<endl;
			return 0;
		}
	}
	
	
	
	
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'a' was not declared in this scope
   22 |         a[]={64,32,16,8,4,2,1};
      |         ^
a.cc:22:11: error: expected primary-expression before ']' token
   22 |         a[]={64,32,16,8,4,2,1};
      |           ^
Language: C++

#include<algorithm>
#include<iostream>
#include<functional>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
  int n,a=1;
  cin>>n;
  if(n==1)
    cout<<1<<endl;
  else{
    for(int i=0;i<100;i++){
      a*=2;
      count++;
      if(a>n)
        break;
    }
    cout<<a/2<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: no post-increment operator for type
   15 |       count++;
      |            ^~
Language: C++


#include <iostream>

using ll = long long;


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll n,m;
	cin >> n;
	int t =1;
	while((t<<1)<=n)t=t<<1;
	cout << t;


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin.tie(0);
      |         ^~~
      |         std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:9: error: 'ios' has not been declared
    9 |         ios::sync_with_stdio(false);
      |         ^~~
a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |         cout << t;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
#include<math.h>
using namespace std;

int main(){
  int N;
  cin >> N;
  int i=0;
  int c;
  
  while(pow(2,i)<=N){
    c=pow(2,i);
    i++
  }
  
  cout << c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: expected ';' before '}' token
   13 |     i++
      |        ^
      |        ;
   14 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int func(int x) {
	if (x % 2 == 1)  return 0;
	return func(x / 2) + 1;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int n;
	cin >> n;
	
	int maxv = 0;
	int ans;
	for (int i = 1; i <= n; i++) {
		if (maxv < func(i)) {
			maxv = func(i);
			ans = i;
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int func(int)':
a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 | int main() {
      |         ^~
a.cc:9:9: note: remove parentheses to default-initialize a variable
    9 | int main() {
      |         ^~
      |         --
a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:9:12: error: a function-definition is not allowed here before '{' token
    9 | int main() {
      |            ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:5:17: note: to match this '{'
    5 | int func(int x) {
      |                 ^
Language: C++

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

int main()
{
	int N;
	cin >> N;
	int ans = 0;
	int res = 1;
		for (int i = 1;i <= N;i++) {
			if (i % 2 == 0) {
				int s = 0;
				for (int j = i;j%2 == 0;j /= 2) {
					s++;
					if (ans < s) {
						ans = s;
						res = i;
					}
				}
			}
		}
		cout << res << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:25:37: error: expected '}' at end of input
   25 |                 cout << res << endl;
      |                                     ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

#include <iostream>
using namespace std;
int N;

int main(){
    cin >> N;
    if(N=1){N=1}
    else if(2<=N<=3){N=2}
    else if(4<=N<=7){N=4}
    else if(8<=N<=15){N=8}
    else if(16<=N<=31){N=16}
    else if(32<=N<=63){N=32;}
    else{N=64;}
    cout << N << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before '}' token
    7 |     if(N=1){N=1}
      |                ^
      |                ;
a.cc:8:25: error: expected ';' before '}' token
    8 |     else if(2<=N<=3){N=2}
      |                         ^
      |                         ;
a.cc:9:25: error: expected ';' before '}' token
    9 |     else if(4<=N<=7){N=4}
      |                         ^
      |                         ;
a.cc:10:26: error: expected ';' before '}' token
   10 |     else if(8<=N<=15){N=8}
      |                          ^
      |                          ;
a.cc:11:28: error: expected ';' before '}' token
   11 |     else if(16<=N<=31){N=16}
      |                            ^
      |                            ;
Language: C++

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

int main(){
  int N, max_number, result;
  cin >> N;
  vector<int> vec(N);
  vector<int> count(N);
  for(int i = 0; i < N; i++){
    vec.at(i) = i + 1;
  }
  vector<int> copy1 = vec;
  for(int i = 0; i < N / 2; i++){
    for(int i = 0; i < N; i++){
      if( vec.at(i) % 2 == 0){
        vec.at(i) /= 2;
        count.at(i)++;
      }
    }
  }
  vector<int> copy = count;
  sort(count.begin(), count.end());
  reverse(count.begin(), count.end());
  max_number = count.at(0);
  for(int i = 0; i < N; i++){
    if(max_number == copy.at(i)){
      result = i;
      break;
    }
  }
  cout << copy1.at(result) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   23 |   sort(count.begin(), count.end());
      |   ^~~~
      |   short
a.cc:24:3: error: 'reverse' was not declared in this scope
   24 |   reverse(count.begin(), count.end());
      |   ^~~~~~~
Language: C++

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

int main(){
  int n;
  int count = 0;
  cin >> n;
  while(n>1){
    n /= 2;
    count ++;
  }
  cout << count << endl;
}

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:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |   cout << count << 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:14:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |   cout << count << 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 <iostream>
#include <bits/stdc++.h>
using namespace std;

int main(){
  int N = 0;
  int a = 0;
  int max = 0;
  cin >> N;
  int counter = 0;
  bool flag = true; 
  for(int i; i < N; i++){
    a = i
    while(a > 1){
       if(a % 2 != 0) break;
       a /= 2;
       counter++;
    }
    if (max <= counter) max = counter;
    counter = 0;
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: expected ';' before 'while'
   13 |     a = i
      |          ^
      |          ;
   14 |     while(a > 1){
      |     ~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  int counter = 0;
  for(int i = 0; i < 6){
   if(n%2 == 0){
     counter++;
     n = n/2;
   }else{
     break;
   }
  }
  cout << counter << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ';' before ')' token
    7 |   for(int i = 0; i < 6){
      |                       ^
      |                       ;
Language: C++

#include <iostream>

use namespace std;

int main() {
  int n;
  cin >> n;
  for(; n % 2; --n);
  cout << n << endl;
}

Compiler output:
a.cc:3:1: error: 'use' does not name a type
    3 | use namespace std;
      | ^~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   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:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout << n << 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:9:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout << n << 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;
  if(N<3){
    cout << 3 << endl;
  }
  else if(N<5){
    cout << 4 << endl;
  }
  else if(N<9){
    cout << 8 << endl;
  }
 else if(N<17){
    cout << 16 << endl;
  }
 else if(N<33){
    cout << 32 << endl;
  }
 else else{
    cout << 64 << endl;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected primary-expression before 'else'
   21 |  else else{
      |       ^~~~
Language: C++

#ianclude<iostream>
using namespace std;

int main(){
  int n;
  cin>>n;
  
  int ans=0;
  
  while(n%2==0){
    ++ans;
    n/=2;
  }
  
  cout<<2*ans<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #ianclude; did you mean #include?
    1 | #ianclude<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: 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 | #ianclude<iostream>
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout<<2*ans<<endl;
      |   ^~~~
a.cc:15:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:16: error: 'endl' was not declared in this scope
   15 |   cout<<2*ans<<endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #ianclude<iostream>
Language: C++

#ianclude<iostrea>
using namespace std;

int main(){
  int n;
  cin>>n;
  
  int ans=0;
  
  while(n%2==0){
    ++ans;
    n/=2;
  }
  
  cout<<2*ans<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #ianclude; did you mean #include?
    1 | #ianclude<iostrea>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: 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 | #ianclude<iostrea>
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout<<2*ans<<endl;
      |   ^~~~
a.cc:15:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:16: error: 'endl' was not declared in this scope
   15 |   cout<<2*ans<<endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #ianclude<iostrea>
Language: C++

#ianclude<iostrea>
using namespace std;

int main(){
  int n;
  cin>>n;
  
  int ans=0;
  
  while(N%2==0){
    ++ans;
    n/=2;
  }
  
  cout<<2*ans>>endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #ianclude; did you mean #include?
    1 | #ianclude<iostrea>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: 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 | #ianclude<iostrea>
a.cc:10:9: error: 'N' was not declared in this scope
   10 |   while(N%2==0){
      |         ^
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout<<2*ans>>endl;
      |   ^~~~
a.cc:15:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:16: error: 'endl' was not declared in this scope
   15 |   cout<<2*ans>>endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #ianclude<iostrea>
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;cin>>n;
  int max=1;
  for(int i=0;i<n;i++){
    if(pow(2,i)<=n&&pow(2,i+1)>n)max=pow(2,i);
  }
  cout<<max<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'pow' was not declared in this scope
    8 |     if(pow(2,i)<=n&&pow(2,i+1)>n)max=pow(2,i);
      |        ^~~
Language: C++

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

int func(int N) {
  int num = 0;
  while (N % 2 == 0) {
    N %= 2;
    num++;
  }
  return num;
}

int main() {
  int ans = 0;
  for (int i = 1; i <= N; i++) {
    ans = max(ans, func(i));
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: 'N' was not declared in this scope
   15 |   for (int i = 1; i <= N; i++) {
      |                        ^
Language: Java

import java.util.Scanner;

public class java{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Max = 0, MaxValue = 0;
		int count = 0;
		

		for (int i = 1; i <= N; i++) {
			int tempI = i;

			while(true) {
				if (tempI % 2 == 0) {
					++count;
					tempI /= 2;
				}
				else {
					if(MaxValue < count) {
						Max = i;
						MaxValue = count;
						
					}
					break;
				}
			}
			count = 0;

		}
		System.out.println(Max);
	}

}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n; cin >> n;
  int j = 0;
  int count = 0;
  if(n >= 64) cout << 6 << endl;
  else if (32 <= n && n < 64) cout << 5 << endl;
  else if (16 <= n && n < 32) cout << 4 << endl;
  else if (8 <= n && n < 16) cout << 3 << endl;
  else if (4 <= n && n < 8) cout << 2 << endl;
  else if (2 <= n && n < 4) cout << 1 << endl;
  else if (n == 1) cout << 0 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:13:38: error: expected '}' at end of input
   13 |   else if (n == 1) cout << 0 << endl;
      |                                      ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main() {
	int N, A[110], B[110];
	cin >> N;
	for (int i = 1; i <= N; i++) {
		A[i] = i;
	}
	for (int i = 0; i <= N; i++) {
		B[i] == 0;
	}
	for (int i = 1; i <= N; i++) {
		while (true) {
			if (A[i] % 2 != 0) {
				break;
			}
			A[i] /= 2;
			B[i] += 1;

		}
	}
	int X=-1;
	for (int i = 1; i <= N; i++) {
		X = max(X, ans);
	}
	int ans=1;
	for (int i = 0; i < X; i++) {
		ans *= 2;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:28: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |                 X = max(X, ans);
      |                            ^~~
      |                            abs
Language: C++

#include <iostream>
using namespace std;

int N;       

int main() {
    cin >> N;
    int res = 0;
    int a = 1;
    while (true) {
        bool w = false;  
        for (int i = 0; i < N; ++i) {
          a *= 2
            if (N < a) w = true;
          if(w) break;
        }
    }
  cout << a << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected ';' before 'if'
   13 |           a *= 2
      |                 ^
      |                 ;
   14 |             if (N < a) w = true;
      |             ~~
Language: C++

#include <iostream>
using namespace std;

int N;       

int main() {
    cin >> N;
    int res = 0;
    while (true) {
        bool exist_odd = false;  
        for (int i = 1; i <= N; ++i) {
            if (i % 2 != 0) exist_odd = true; 
        }

        if (exist_odd) break; 

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

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

#include <iostream>
using namespace std;

int N;       

int main() {
    cin >> N;
    int res = 0;
    while (true) {
        bool exist_odd = false;  
        for (int i = 1; i <= N; ++i) {
            if (i % 2 != 0) exist_odd = true; 
        }

        if (exist_odd) break; 

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'A' was not declared in this scope
   19 |             A[i] /= 2;
      |             ^
a.cc:27:23: error: expected '}' at end of input
   27 |     cout << a << endl;
      |                       ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'i' was not declared in this scope
   10 |     for (i = 1;i <= N;++i) {
      |          ^
a.cc:14:10: error: 'i' was not declared in this scope
   14 |     for (i = 1;i <= N;++i) {
      |          ^
Language: Java

import java.util.Scanner;

public class ABC068B {

	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int N=sc.nextInt();
		for(int i =1;i<=N;i++){
			if(Math.pow(2, i)<=N&&N<Math.pow(2, i+1)){
				System.out.println((int)Math.pow(2, i));
				break;
			}

		}

	}

}


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

import java.util.Scanner;

public class ABC068B {

	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int N=sc.nextInt();
		for(int i =N;i>=1;i--){
			if(i%2==0){
				System.out.println(i);
				break;
			}
		}

	}

}


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

import java.util.Scanner;

public class ABC068B {

	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int N=sc.nextInt();
		for(int i =N;i>=1;i--){
			if(i%2==0){
				System.out.println(i);
				break;
			}
		}

	}

}


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class ABC068B {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ABC068B'
    3 | public class ABC068B {
      |              ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >>N;
  int ans =1
  for(int i=0;ans<=N;i++){
    ans *= 2;
  }
  cout << ans/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i=0;ans<=N;i++){
      |   ^~~
a.cc:8:22: error: 'i' was not declared in this scope
    8 |   for(int i=0;ans<=N;i++){
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >>N;
  int ans =1
  for(i=0;ans<=N;i++){
    ans *= 2;
  }
  cout << ans/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(i=0;ans<=N;i++){
      |   ^~~
a.cc:8:18: error: 'i' was not declared in this scope
    8 |   for(i=0;ans<=N;i++){
      |                  ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
    cin>>n;
    if (n>=64) cout<<64;
    if (n<64&&n>=32) cout<<32;
    if (n<32&&n>=16) cout<<16;
    if (n<16&&n>=8) cout<<8;
    if (n<8&&n>=4) cout<<4;
    if (n<4&&n>=2) cout<<2;
    if (n<2) cout<<1;
    return 0;
}

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

/^1$/c1
/^2$/c2
/^3$/c2
/^4$/c4
/^5$/c4
/^6$/c4
/^7$/c4
/^8$/c8
/^9$/c8
/^10$/c8
/^11$/c8
/^12$/c8
/^13$/c8
/^14$/c8
/^15$/c8
/^16$/c16
/^17$/c16
/^18$/c16
/^19$/c16
/^20$/c16
/^21$/c16
/^22$/c16
/^23$/c16
/^24$/c16
/^25$/c16
/^26$/c16
/^27$/c16
/^28$/c16
/^29$/c16
/^30$/c16
/^31$/c16
/^32$/c32
/^33$/c32
/^34$/c32
/^35$/c32
/^36$/c32
/^37$/c32
/^38$/c32
/^39$/c32
/^40$/c32
/^41$/c32
/^42$/c32
/^43$/c32
/^44$/c32
/^45$/c32
/^46$/c32
/^47$/c32
/^48$/c32
/^49$/c32
/^50$/c32
/^51$/c32
/^52$/c32
/^53$/c32
/^54$/c32
/^55$/c32
/^56$/c32
/^57$/c32
/^58$/c32
/^59$/c32
/^60$/c32
/^61$/c32
/^62$/c32
/^63$/c32
c64

Compiler output:
a.cc:1:1: error: expected unqualified-id before '/' token
    1 | /^1$/c1
      | ^
Language: C++

#include <iostream>
#include <limits.h>
using namespace std;

int main() {
	int n;
	cin >> n;
	if (n == 1) cout << "1";
	else if (2 <= n && n < 4) cout << "2";
	else if (4 <= n && n < 8) cout << "4";
	else if (8 <= n && n < 16) cout << "8";
	else if (16 <= n && n < 32) cout << "16";
	else if (32 <= n && n < 64) cout << "32";
	else cout << "64";
	return 0;
	}
}


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

#include <bits/stdc++.h>

int main() {
  int N,M=4;
  if(N<4 && N>=2){
    cout << "2" << endl;
  }
  if(N>2){
    cout << N << endl;
  }
  if(N>=4){
    while(1){
      if(N<=M){
        cout << M << endl;
        break;
      }
      M+4;
    }
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout << "2" << endl;
      |     ^~~~
      |     std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout << "2" << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << N << 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:9:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout << N << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |         cout << M << 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:14:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |         cout << M << endl;
      |                      ^~~~
      |                      std::endl
/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;
long long n;
int main(void)
{
	cin>>n;
    cout<<n/2*2
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before 'return'
    7 |     cout<<n/2*2
      |                ^
      |                ;
    8 |         return 0;
      |         ~~~~~~
Language: C++

#include<cstdio>
#include<iostream>
using namespace std;
int n,ans;
void ksm(int a)
{
	int k=1,b=2;
	while(a)
	{
		if (a & 1) k*=b;
		b*=b;
		a>>=1;
	}
	return k;
}
int main()
{
	cin>>n;
	while(n)
	{
		n>>=1;
		ans++;
	}
	cout<<ans;
	ksm(ans-1);
	return 0;
}

Compiler output:
a.cc: In function 'void ksm(int)':
a.cc:14:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   14 |         return k;
      |                ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.*;

public class Main {

    int[] inputArray;

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    void run() {
        Scanner sc = new Scanner(System.in);
        int input = sc.nextInt();
int n = 1;
        while(true){
if (n >= input) {
n/=2;
break;}

n＊=2;
}

System.out.println(n);
    }

}


Compiler output:
Main.java:24: error: illegal character: '\uff0a'
n?=2;
 ^
Main.java:24: error: not a statement
n?=2;
^
2 errors
Language: C++

#include <iostream>
#include <sstream>
using namespace std;
int main(){
  int n;
  int i;
  cin >> n;
  int wari = 0;
  int kouho = 1;
  for(i = 1; i<= n; i++){
    int count = 0;
    int j =i 
    while (j % 2 == 0){
      count++;
      if(j % 2 == 0){
        j = j / 2;
      }else{
      break;
      }
    }
      if (count > wari){
      wari = count;
      kouho = i;
      }
    }

  cout << kouho << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected ',' or ';' before 'while'
   13 |     while (j % 2 == 0){
      |     ^~~~~
Language: C++

#include <iostream>
#include <sstream>
using namespace std;
int main(){
  int n;
  int i;
  cin >> n;
  int wari = 0;
  int kouho = 1;
  for(i = 1; i<= n; i ++){
    int count = 0;
    while (i % 2 == 0){
      count++;
      if(i % 2 == 0){
        i = i / 2;
      }
      if (count > wari){
      wari = count;
      kouho = i
      }
    }
  }
  cout << kouho << endl;
  return 0;
}


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

#include <iostream>
#include <sstream>
using namespace std;
int main(){
  int n;
  int i;
  cin >> n;
  int wari = 0;
  int kouho = 1;
  for(i = 1; i<= n; i ++){
    count = 0;
    while (i % 2 == 0){
      count++;
      if(i % 2 == 0){
        i = i / 2;
      }
      if (count > wari){
      wari = count;
      kouho = i
      }
    }
  }
  cout << kouho << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'count' was not declared in this scope
   11 |     count = 0;
      |     ^~~~~
a.cc:19:16: error: expected ';' before '}' token
   19 |       kouho = i
      |                ^
      |                ;
   20 |       }
      |       ~
Language: C

#include<bits/stdc++.h>
using namespace std;
int ans;
int main(){
    int N;
    cin>>N;
    for(int i=1;i<=N;i*=2){
        ans=max(ans,i);
    }
    cout<<ans<<endl;
    return 0;
}

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

#include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,n)  FOR(i,0,n)
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<vector<P>> Graph;


int main(){

  int n;
  
  int i = 1
  while(1){
    i *= 2
      if(i > n) break;
  }
  
  cout << i/2 << endl;


 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: expected ',' or ';' before 'while'
   19 |   while(1){
      |   ^~~~~
Language: C++

#include<iostream>
using namespace std;

int N, res = 1,;

main() {
  cin >> N;
  while (N > res) res = res * 2;
  cout << res << endl;
  return 0;
}

Compiler output:
a.cc:4:16: error: expected unqualified-id before ';' token
    4 | int N, res = 1,;
      |                ^
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main() {
      | ^~~~
Language: C++

#include<iostream>
using namespace std;

int N, ans;
int A[123],res[123];

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

Compiler output:
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before 'res'
   13 |             A[i] = A[i] % 2
      |                            ^
      |                            ;
   14 |             res[i] = res[i] + 1
      |             ~~~
Language: C++

#include<iostream>
using namespace std;

int N, ans;
int A[123],res[123];

main() {
  cin >> N;
  for (int i = 0; i < N; ++i) A[i] = i;
  for (int i = 0; i < N; ++i) res[i] = 0;
  for (int i = 0; i < N; ++i) {
        while (A[i] % 2 = 0) {
            A[i] = A[i] % 2
            ++res[i]
            if (res[i] > ans) ans = res[i]
        }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:21: error: lvalue required as left operand of assignment
   12 |         while (A[i] % 2 = 0) {
      |                ~~~~~^~~
a.cc:13:27: error: lvalue required as increment operand
   13 |             A[i] = A[i] % 2
      |                           ^
Language: C++

include <iostream>
using namespace std;

int N, ans;
int A[123],res[123];

main() {
  cin >> N;
  for (int i = 0; i < N; ++i) A[i] = i;
  for (int i = 0; i < N; ++i) {
        while (A[i] % 2 = 0) {
            A[i] % 2 = 0
            ++res[i]
            if (res[i] > ans) ans = res[i]
  }
  cout >> ans >> endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> N;
      |   ^~~
a.cc:11:21: error: lvalue required as left operand of assignment
   11 |         while (A[i] % 2 = 0) {
      |                ~~~~~^~~
a.cc:12:24: error: lvalue required as increment operand
   12 |             A[i] % 2 = 0
      |                        ^
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout >> ans >> endl;
      |   ^~~~
a.cc:16:18: error: 'endl' was not declared in this scope
   16 |   cout >> ans >> endl;
      |                  ^~~~
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:7:8: note: to match this '{'
    7 | main() {
      |        ^
Language: C++

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

using namespace std;

int main(){

	int n,a=1;
	cin >> n;
	for(int i = 6; 0 <= i; i--){
		for(int j = i; 0 < j; j--){
			a = a*2;
		}¥
		if( a <= n ){
			cout << a << endl;
			return 0;
		}
		a = 1;
	}

	return 0;
}

Compiler output:
a.cc:16:18: error: extended character ¥ is not valid in an identifier
   16 |                 }¥
      |                  ^
a.cc: In function 'int main()':
a.cc:16:18: error: '\U000000a5' was not declared in this scope
   16 |                 }¥
      |                  ^
Language: C++

#include <iostream>
using namespace std;
int main(){
 int n,ans=0;
  cin>>n;
  if(n>=64) cout<<"64"<<endl;
  else if(n<64&&n>=8){
    for(int i=1;i<=n%8){
      ans*=8*i;
    }
    cout<<ans<<endl;
  }
  else if(1<n<4) cout<<"2"<<endl;
  else if(n==1) cout<<"1"<<endl;
  else cout<<"4"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before ')' token
    8 |     for(int i=1;i<=n%8){
      |                       ^
      |                       ;
Language: C++

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

int main() {
  int N, i;
  cin >> N;
  for (i=0; i<7; ++i){
    if ( N <= pow(2,(i+1))-1){
      cout << pow(2,i) <<endl
      break;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: expected ';' before 'break'
    9 |       cout << pow(2,i) <<endl
      |                              ^
      |                              ;
   10 |       break;
      |       ~~~~~                   
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  int counter = 0;
  for (i=0; i <10; ++i){
    if (N%2 == 0) break;
    ++counter;
    N = N/2;
  }
  cout << counter <<endl;
}

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

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

int main() {
  int N;
  cin >> N
  int counter = 0;
  for (i=0; i <10; ++i){
    if (N%2 == 0) break;
    ++counter;
    N = N/2;
  }
  cout << counter <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'int'
    6 |   cin >> N
      |           ^
      |           ;
    7 |   int counter = 0;
      |   ~~~      
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   for (i=0; i <10; ++i){
      |        ^
a.cc:10:7: error: 'counter' was not declared in this scope
   10 |     ++counter;
      |       ^~~~~~~
a.cc:13:11: error: 'counter' was not declared in this scope
   13 |   cout << counter <<endl;
      |           ^~~~~~~
Language: C++

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

int main() {
  int N;
  int counter = 0;
  for (i=0; i <10; ++i){
    if (N%2 == 0) break;
    ++counter;
    N = N/2;
  }
  cout << counter <<endl;
}

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

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
 
using namespace std;
 
int main(){

  int N,A,B;
  
  cin >> N;
  
  int A = 2;
  
  while(N < A){
  A = A * A;
    B = N;
  }

  cout << B << endl;
  
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: redeclaration of 'int A'
   24 |   int A = 2;
      |       ^
a.cc:20:9: note: 'int A' previously declared here
   20 |   int N,A,B;
      |         ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
 
using namespace std;
 
int main(){
int N;
  int A,B,C,D,E;
  int i;
  
  D = 1;
  E = 1;
  
  cin >> N;

  for(i = 1;i <=N;i++){
  C = N;
  
  while (A == 0 && C =! 0){
  A = C % 2;
  C = C / 2;
  B = B + 1;
  }
    
  if(B > D)
    E = i;
    
  }
  
  cout << E << endl;
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: lvalue required as left operand of assignment
   31 |   while (A == 0 && C =! 0){
      |          ~~~~~~~^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int N, ans=0;
	cin >> N;
	for(int i=1; i<=N; i++){
		if(i/2>ans/2) ans=i;
	}
	cout << i;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'i' was not declared in this scope
   10 |         cout << i;
      |                 ^
Language: C

#include<bits/stdc++.h>
using namespace std;
int n;
int a=2;
int main(){
   cin>>n;
  while(a<=n){
    a*=2;
  }
  cout<<a/2<<endl;
  return 0;
}


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

#include <iostream>
#include <string>
#include <string.h>
#include <map>
#include <set>
#include <vector>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <queue>
#include <cmath>
#include <cstdio>
using namespace std;
int main(){
int a;
cin>>a;
int b=1;
int c=1;
for(int i=0;i<n;i++)
{b*=2;
if(a>=b)
c=b;}
cout<<c;
system("pause");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: 'n' was not declared in this scope
   19 | for(int i=0;i<n;i++)
      |               ^
Language: C++

#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
const long long d2=(mod+1)/2;
const double EPS=1e-6;
const double PI=acos(-1.0);
int ABS(int a){return max(a,-a);}
long long ABS(long long a){return max(a,-a);}
char in[100000];
int main(){
	int a;scanf("%d",&a);
	int ret=1;
	int val=0;
	for(int i=1;i<=a;i++){
		int tmp=i;
		int v=0;
		wihle(tmp%2==0){
			tmp/=2;v++;
		}
		if(val<v){
			val=v;ret=i;
		}
	}printf("%d\n",ret);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'wihle' was not declared in this scope
   32 |                 wihle(tmp%2==0){
      |                 ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  int x=2;
  cin>>n;
  for(n>=x)x*=2;
  cout<<x/2;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected ';' before ')' token
    7 |   for(n>=x)x*=2;
      |           ^
      |           ;
a.cc:9:3: error: expected primary-expression before 'return'
    9 |   return 0;
      |   ^~~~~~
a.cc:8:13: error: expected ')' before 'return'
    8 |   cout<<x/2;
      |             ^
      |             )
    9 |   return 0;
      |   ~~~~~~     
a.cc:7:6: note: to match this '('
    7 |   for(n>=x)x*=2;
      |      ^