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

#include <iostream>
using namespace std;

double main(){
    double N;
    cin >> N;
    double max;
    for (double i = 0; i < 7; ++i){
        double A = pow(2, i);
        if (A <= N){
            max = A;
        }
        else break;
    }
    cout << max << endl;
}


Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | double main(){
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:9:20: error: 'pow' was not declared in this scope
    9 |         double A = pow(2, i);
      |                    ^~~
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'pow' was not declared in this scope
    9 |         int A = pow(2, i);
      |                 ^~~
Language: C++

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

 int main() {

int N,kai;
cin >> N;

while(int i = 0){
               if(2**(i) <= N) {
                        kai = std::pow(2, i);
                        i++;
                        }
               else break;
                }
cout << kai <<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: invalid type argument of unary '*' (have 'int')
   10 |                if(2**(i) <= N) {
      |                     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int N;
    cin >> N;
    int max;
    for (int i = 0; i < 7; ++i){
        int A = 2**i;
        if (A <= N){
            max = A;
        }
        else break;
    }
    cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: invalid type argument of unary '*' (have 'int')
    9 |         int A = 2**i;
      |                   ^~
Language: C++

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

 int main() {

int N,kai;
cin >> N;

while(int i = 0){
               if(2**(i) <= N) {
                        kai = 2**(i);
                        i++;
                        }
               else break;
                }
cout << kai <<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: invalid type argument of unary '*' (have 'int')
   10 |                if(2**(i) <= N) {
      |                     ^~~~
a.cc:11:33: error: invalid type argument of unary '*' (have 'int')
   11 |                         kai = 2**(i);
      |                                 ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int N;
    cin >> N;
    int max;
    for (int i = 0; i<7; ++i){
        if (2**i <= N){
            max = 2**i;
        }
        else break;
    }
    cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: invalid type argument of unary '*' (have 'int')
    9 |         if (2**i <= N){
      |               ^~
a.cc:10:21: error: invalid type argument of unary '*' (have 'int')
   10 |             max = 2**i;
      |                     ^~
Language: C++

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

 int main() {

int N;
cin >> N;
int res, kai, j;
int maxN = 0;
for(int i=1; i <=N; i++){
       j = i;
       res = 0;
       while(true){
                 bool fl = false ;
                 if( j%2==1){
                            fl = true ;
                 }
                 else{
                            j = j/2;
                            res = res + 1;
                  }
                  if(fl) break;
       }
       if(maxN =< res) {
                  maxN = res ;
                  kai = i ;
        }
}
cout << kai << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: expected primary-expression before '<' token
   24 |        if(maxN =< res) {
      |                 ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: array must be initialized with a brace-enclosed initializer
    8 |     int A[0] = 0;
      |                ^
a.cc:10:20: error: array must be initialized with a brace-enclosed initializer
   10 |         int A[i] = 0;
      |                    ^
Language: C++

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

 int main() {

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: expected ',' or ';' before 'int'
   12 |        int res = 0;
      |        ^~~
a.cc:20:29: error: 'res' was not declared in this scope
   20 |                             res = res + 1;
      |                             ^~~
a.cc:24:18: error: 'res' was not declared in this scope
   24 |        if(maxN < res) kai = i ;
      |                  ^~~
Language: C++

#include <iostream>
using namespace std;

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

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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: array must be initialized with a brace-enclosed initializer
    7 |     int A[N+10] = 0;
      |                   ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  cin>>N;
  int i=2;
  
  while(i<=N){
    i=i*2;
  }
  
  cout<<i<<endl;
}


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

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

int main(){
  int N;
  cin >> N;
  
  count=0;
  while (N%2==0){
    count++;
    break;
  }
  cout << N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: overloaded function with no contextual type information
    8 |   count=0;
      |         ^
a.cc:10:10: error: no post-increment operator for type
   10 |     count++;
      |          ^~
Language: C++

N = int(input())

def cal(n):
    cnt = 0
    while n % 2 == 0:
        n = n//2
        cnt += 1
    return cnt

ans = -1
for i in range(N,0,-1):
    if ans < cal(i):
        ans = cal(i)
        ans_n = i
print(ans_n)

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

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

int main(){
  int ans[7]={1,2,4,8,16,32,64}
  int n;
  cin >> n;
  for(int i=0;i<7;i++){
    if(ans[i]>n){
      cout << ans[i-1] << endl;
      break;
    }
  }
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'int'
    6 |   int n;
      |   ^~~
a.cc:7:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   cin >> n;
      |          ^
      |          yn
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <math.h>
#include <iomanip> //setprecision
#include <limits>
using namespace std;
int main(){
    int n;
    cin >> n;
    if(n<2) cout << 1 << endl:
    else if(n<4) cout << 2 << endl;
    else if(n<8) cout << 4 << endl;
    else if(n<16) cout << 8 << endl;
    else if(n<32) cout << 16 << endl;
    else if(n<64) cout << 32 << endl;
    else cout << 64 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:30: error: expected ';' before ':' token
   25 |     if(n<2) cout << 1 << endl:
      |                              ^
      |                              ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[8]={1,2,4,8,16,32,64,128};
int main(){
	int n;
	cin>>n;
	for(int i=0;i<8;i++){
		if(a[i]>n){
			i--;
			break;
		}
	}
	cout<<a[i]<<endl;
}

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

#include<bits/stdc++.h>
using namespace std;
int a[8]={1,2,4,8,16,32,64,128}
int main(){
	int n;
	cin>>n;
	for(int i=0;i<8;i++){
		if(a[i]>n){
			i--;
			break;
		}
	}
	cout<<a[i]<<endl;
}

Compiler output:
a.cc:4:1: error: expected ',' or ';' before 'int'
    4 | int main(){
      | ^~~
Language: Java

import java.utli.*;
class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt();
          
      if(n<=2){
        System.out.println(2);
      }else if(2<n&&n<=4){
        System.out.println(4);
      }else if(2<n&&n<=8){
        System.out.println(8);
      }else if(2<n&&n<=16){
        System.out.println(16);
      }else if(2<n&&n<=32){
        System.out.println(32);
      }else{
        System.out.println(64);
      }
  }
}

Compiler output:
Main.java:1: error: package java.utli does not exist
import java.utli.*;
^
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C++

#include <string>
#include <algorithm>
using namespace std;
int main() {
	int n;
	cin >> n;
	int cnt = 0;
	while(true){
		if(n == 1) break;
		n /= 2;
		cnt++;
	}
	cout << (1 << cnt) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> n;
      |         ^~~
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:13:9: error: 'cout' was not declared in this scope
   13 |         cout << (1 << cnt) << endl;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:31: error: 'endl' was not declared in this scope
   13 |         cout << (1 << cnt) << endl;
      |                               ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before ')' token
    9 |   for (i,i<8,i++){
      |                 ^
      |                 ;
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:18:4: error: expected ';' before '}' token
   18 |   }
      |    ^
      |    ;
   19 | 
   20 | }
      | ~   
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:18:4: error: expected ')' before '}' token
   18 |   }
      |    ^
      |    )
   19 | 
   20 | }
      | ~   
a.cc:9:7: note: to match this '('
    9 |   for (i,i<8,i++){
      |       ^
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int i=0;
  for (i,i<8,i++){
    if (N >= 2^(i)) continue;
    else cout << 2^(i-1) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before ')' token
    9 |   for (i,i<8,i++){
      |                 ^
      |                 ;
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
a.cc:12:4: error: expected ';' before '}' token
   12 |   }
      |    ^
      |    ;
   13 | }
      | ~   
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
a.cc:12:4: error: expected ')' before '}' token
   12 |   }
      |    ^
      |    )
   13 | }
      | ~   
a.cc:9:7: note: to match this '('
    9 |   for (i,i<8,i++){
      |       ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int i=0
  for (i,i<8,i++){
    if (N >= 2^(i)) continue;
    else cout << 2^(i-1) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (i,i<8,i++){
      |   ^~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  for (int i=0,i<8,i++){
    if (N >= 2^(i)) continue;
    else cout << 2^(i-1) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before '<' token
    8 |   for (int i=0,i<8,i++){
      |                 ^
      |                 ;
a.cc:8:17: error: expected primary-expression before '<' token
a.cc:8:23: error: expected ';' before ')' token
    8 |   for (int i=0,i<8,i++){
      |                       ^
      |                       ;
a.cc:10:26: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |     else cout << 2^(i-1) << endl;
      |                    ~~~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
 
int main() {

int N;
cin >> N;

if (N = 1)
{
    out = 1;
}

if (1 < N < 4)
{
    out = 2;
}

if (4 =< N < 8)
{
    out = 4;
}

if (8 =< N < 16)
{
    out = 8;
}

if (16 =< N < 32)
{
    out = 16;
}

if (32 =< N < 64)
{
    out = 32;
}

if (64 =< N)
{
    out = 64;
}

cout << out << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'out' was not declared in this scope
   12 |     out = 1;
      |     ^~~
a.cc:17:5: error: 'out' was not declared in this scope
   17 |     out = 2;
      |     ^~~
a.cc:20:8: error: expected primary-expression before '<' token
   20 | if (4 =< N < 8)
      |        ^
a.cc:22:5: error: 'out' was not declared in this scope
   22 |     out = 4;
      |     ^~~
a.cc:25:8: error: expected primary-expression before '<' token
   25 | if (8 =< N < 16)
      |        ^
a.cc:27:5: error: 'out' was not declared in this scope
   27 |     out = 8;
      |     ^~~
a.cc:30:9: error: expected primary-expression before '<' token
   30 | if (16 =< N < 32)
      |         ^
a.cc:32:5: error: 'out' was not declared in this scope
   32 |     out = 16;
      |     ^~~
a.cc:35:9: error: expected primary-expression before '<' token
   35 | if (32 =< N < 64)
      |         ^
a.cc:37:5: error: 'out' was not declared in this scope
   37 |     out = 32;
      |     ^~~
a.cc:40:9: error: expected primary-expression before '<' token
   40 | if (64 =< N)
      |         ^
a.cc:42:5: error: 'out' was not declared in this scope
   42 |     out = 64;
      |     ^~~
a.cc:45:9: error: 'out' was not declared in this scope
   45 | cout << out << endl;
      |         ^~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
int main()
{
  int a[7]={1,2,4,8,16,32,64}
   int n;
  cin>>n;
  int i;
  for(i=0;i<7;++i)
  {
    if(a[i]>n)
        break;
  }
  
  printf("%d",a[i-1]);
     
 
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: expected ',' or ';' before 'int'
    8 |    int n;
      |    ^~~
a.cc:9:8: error: 'n' was not declared in this scope
    9 |   cin>>n;
      |        ^
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
int main()
{
  int a[7]={1,2,4,8,16,32,64}
   int n;
  cin>>n;
  int i;
  for(i=0;i<8;++i)
  {
    if(a[i]>n)
        break;
  }
  
  printf("%d",a[i-1]);
     
 
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: expected ',' or ';' before 'int'
    8 |    int n;
      |    ^~~
a.cc:9:8: error: 'n' was not declared in this scope
    9 |   cin>>n;
      |        ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;
     cin>>n;
   if(n==1){
     cout<<"1";
     retutn 0;
   }
   if(n==2){
     cout<<"2";
     return 0;
   }
   if(n<=7 && n>2) {
   	  cout<<"4";
   	  return 0;
   } 

    if(n<=15) {
   	  cout<<"8";
   	  return 0;
   } 
   if(n<=31) {
   	  cout<<"16";
   	  return 0;
   }

   if(n<=63) {
   	  cout<<"32";
   	  return 0;
   }
   if(n<=100) {
   	  cout<<"64";
   	  return 0;
   }

  return 0;
    
}


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

#include<iostream>
using namespace std;

int main(){
     cin>>n;

   if(n<=7) {
   	  cout<<"4";
   	  return 0;
   } 

    if(n<=15) {
   	  cout<<"8";
   	  return 0;
   } 
   if(n<=31) {
   	  cout<<"16";
   	  return 0;
   }

   if(n<=63) {
   	  cout<<"32";
   	  return 0;
   }
   if(n<=100) {
   	  cout<<"64";
   	  return 0;
   }

  return 0;
    
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N;
  cin >>N;


if(N==1){
 cout <<1<<endl;
}
else(N<4){
cout <<2<<endl;
}
else(N<8){
cout <<4<<endl;
}else(N<16){
cout <<2<<endl;
}else(N<32){
cout <<16<<endl;
}else(N<64){
cout <<32<<endl;
}
else(N>=64){
cout <<264<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected ';' before '{' token
   12 | else(N<4){
      |          ^
      |          ;
a.cc:15:1: error: 'else' without a previous 'if'
   15 | else(N<8){
      | ^~~~
a.cc:15:10: error: expected ';' before '{' token
   15 | else(N<8){
      |          ^
      |          ;
a.cc:17:2: error: 'else' without a previous 'if'
   17 | }else(N<16){
      |  ^~~~
a.cc:17:12: error: expected ';' before '{' token
   17 | }else(N<16){
      |            ^
      |            ;
a.cc:19:2: error: 'else' without a previous 'if'
   19 | }else(N<32){
      |  ^~~~
a.cc:19:12: error: expected ';' before '{' token
   19 | }else(N<32){
      |            ^
      |            ;
a.cc:21:2: error: 'else' without a previous 'if'
   21 | }else(N<64){
      |  ^~~~
a.cc:21:12: error: expected ';' before '{' token
   21 | }else(N<64){
      |            ^
      |            ;
a.cc:24:1: error: 'else' without a previous 'if'
   24 | else(N>=64){
      | ^~~~
a.cc:24:12: error: expected ';' before '{' token
   24 | else(N>=64){
      |            ^
      |            ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N;
  cin >>N;


if(N==1)
 cout <<1<<endl;
}
else(N<4)
cout <<2<<endl;
}
else(N<8)
cout <<4<<endl;
}else(N<16)
cout <<2<<endl;
}else(N<32)
cout <<16<<endl;
}else(N<64)
cout <<32<<endl;
}
else(N>=64)
cout <<264<endl;
}
}

Compiler output:
a.cc:12:1: error: expected unqualified-id before 'else'
   12 | else(N<4)
      | ^~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
a.cc:15:1: error: expected unqualified-id before 'else'
   15 | else(N<8)
      | ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }else(N<16)
      | ^
a.cc:17:2: error: expected unqualified-id before 'else'
   17 | }else(N<16)
      |  ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }else(N<32)
      | ^
a.cc:19:2: error: expected unqualified-id before 'else'
   19 | }else(N<32)
      |  ^~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }else(N<64)
      | ^
a.cc:21:2: error: expected unqualified-id before 'else'
   21 | }else(N<64)
      |  ^~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
a.cc:24:1: error: expected unqualified-id before 'else'
   24 | else(N>=64)
      | ^~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <iostream>
#include<string.h>
#include<algorithm>
using namespace std;

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

	int c = 0;
	int c_MAX = -1;
	int a_MAX=-1;
	for (int i = 0; i < N; ++i) {

		while (true) {
			if (a[i] % 2 != 0)break;
			else a[i] = a[i] / 2;
			c = c + 1;
		}
		if (c > c_MAX) {
			c_MAX = c;
		}

		c = 0;
	}
	cout << pow(2,c_MAX) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: 'pow' was not declared in this scope
   29 |         cout << pow(2,c_MAX) << endl;
      |                 ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n;
  cin >> n;
  
  int result = 1;
  int max_count = 0;
  for (int i = 1; i <= n; i++){
    int count = 0;
    while (true){
      if (i % 2 != 0) break;
      i /= 2;
      ++count;
    }
    if (count > max_count){
      max_division = count;
      result = i;
    }
  }
  cout << result << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:7: error: 'max_division' was not declared in this scope
   18 |       max_division = count;
      |       ^~~~~~~~~~~~
Language: C++

#include <iostream>
#include<algorithm>
#include<sstream>
#include<cmath>
#include<vector>
#include<iomanip>
#include<map>
#include<set>
#include<queue>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i = 0; i < n;i++)
vector<bool> b(1000001,false);
int main(void) {
	int n, m; cin >> n;
	if (n == 1) cout << １ << endl;
	else if (n < 4) cout << 2 << endl;
	else if (n < 8) cout << 4 << endl;
	else if (n < 16) cout << 8 << endl;
	else if (n < 32) cout << 16 << endl;
	else if (n < 64) cout << 32 << endl;
	else  cout << 64 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: '\U0000ff11' was not declared in this scope
   16 |         if (n == 1) cout << １ << endl;
      |                             ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
using ll = long long;

int main() {
  int n; cin >> n;
  int i = 0;
  int ans = 0;
  while(1) {
    int x = pow(2,i);
    if (x > n) break
    ans = x;
    i++;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before 'ans'
   12 |     if (x > n) break
      |                     ^
      |                     ;
   13 |     ans = x;
      |     ~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int ans = 0;
  int List[9] = {-1,1,2,4,8,16,32,64,128};
  for (int i = 8; i >= 1 i--) {
    if (List[i] > N && N >= List[i - 1]) {
      ans = List[i - 1];
      break;
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: expected ';' before 'i'
    8 |   for (int i = 8; i >= 1 i--) {
      |                         ^~
      |                         ;
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>

using namespace std;
typedef long long llint;
#define inf 1e18

llint n,m;

void solve(){
	cin >> n;
	int ans = 0;
	for(; n; n/=2) ans++;

	cout << (1<<(ans-1)) << endl;
	return 0;
}

int main(int argc, char *argv[]) {
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:18:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   18 |         return 0;
      |                ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int N;
int i;
cin>>N;
int a[N];
  for(i=0;i<=N;i++){
    int count=0;
  while(i%2){
  i/=2;
  count++;
  }
    a[i]=count;
}
  cout<<sort(a);

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |   cout<<sort(a);
      |         ^~~~
      |         short
a.cc:16:17: error: expected '}' at end of input
   16 |   cout<<sort(a);
      |                 ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
int main()
  {
    int n;
    scanf("%d",&n);
    int i,max=0,cnt=0;
    for(i=1;i<=n;++i)
    {
      cnt=0;
      while(i%2==0 && i>0)
      {
        i/=2;
        cnt+++;
      }
      if(max<cnt)
          max=cnt;
    }
    printf("%d",max);
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: expected primary-expression before ';' token
   16 |         cnt+++;
      |               ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(
  {
    int n;
    scanf("%d",&n);
    int i,max=0,cnt=0;
    for(i=1;i<=n;++i)
    {
      cnt=0;
      while(i%2==0 && i>0)
      {
        i/=2;
        cnt+++;
      }
      if(max<cnt)
          max=cnt;
    }
    printf("%d",max);
  }

Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main(
      |     ^~~~
a.cc:7:5: error: expected primary-expression before 'int'
    7 |     int n;
      |     ^~~
a.cc:7:5: error: expected '}' before 'int'
a.cc:6:3: note: to match this '{'
    6 |   {
      |   ^
a.cc:6:4: error: expected ')' before 'int'
    6 |   {
      |    ^
      |    )
    7 |     int n;
      |     ~~~
a.cc:5:9: note: to match this '('
    5 | int main(
      |         ^
a.cc:8:10: error: expected constructor, destructor, or type conversion before '(' token
    8 |     scanf("%d",&n);
      |          ^
a.cc:10:5: error: expected unqualified-id before 'for'
   10 |     for(i=1;i<=n;++i)
      |     ^~~
a.cc:10:13: error: 'i' does not name a type
   10 |     for(i=1;i<=n;++i)
      |             ^
a.cc:10:18: error: expected unqualified-id before '++' token
   10 |     for(i=1;i<=n;++i)
      |                  ^~
a.cc:21:11: error: expected constructor, destructor, or type conversion before '(' token
   21 |     printf("%d",max);
      |           ^
a.cc:22:3: error: expected declaration before '}' token
   22 |   }
      |   ^
Language: C++

#include <stdio.h>



int main(void) {
	int n,max=0,cnt=0;
  scanf("%d",&n);
  for(i=1;i<=n;++i)
  {
    cnt=0;
     while(i%2==0)
     {
        i/=2;
       cnt++;
     }
    if(max<cnt)
         max=cnt;
  }
  
  printf("%d",max);
	return 0;
}


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

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

int main(){
  int N;
  cin >> N;
  int max_count = -1;
  int n;
  for(int i=1;i<=N;i=i+1){
    int count = 0;
    int x = i;
    while(x%2 = 0){
      x = x/2;
      count = count + 1;
    }
    if(max_count < count){
      max_count = count;
      n = i;
    }
  }
  cout << n << endl;
}

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

#include<iostream>
using namespace std;
int main(){
    long long a[8]={0,1,2,4,8,16,32,64};
    long long n;
    cin>>n;
    for(int i=7;i;i--){
        if(a[i]<=n){
            cout<<a[i]<<endl;
            return 0;
        }
    }

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

#include<iostream>
using namespace std;
int main()
{
int N, max, count, num;
  cin >> N;
   max = 0;
  count = 0;
  while (true){
        if(N == 0){
     break; 
    }
    
    
    if(N % 2 != 0){
      N--;
     continue; 
    }
    while(N % 2 == 0){
     N /= 2;
      count++;
    }
    if(count > max){
     max = count; 
    }
  }
  for(int i = 0; i > max; i++)
  {
    num *= 2
  }
    cout << num << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: expected ';' before '}' token
   29 |     num *= 2
      |             ^
      |             ;
   30 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;
int main()
{
int N, max, count;
  cin >> N;
   max = 0;
  count = 0;
  while (true){
    if(N % 2 != 0){
      N--;
     continue; 
    }
    while(N % 2 == 0){
     N / 2;
      count++;
    }
    if(count > max){
     max = count; 
    }
    if(N == 0){
     break; 
    }
    cout << max <<endl;
  }


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

#include<iostream>
using namespace std;
int main()
{
int N, count;
  cin >> N;
  count = 0;
  while (true){
    bool check = false;
    if (N % 2 != 0) {check = true;}
    if (check == ture){break;}
    N /= 2;
    count++;
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'ture' was not declared in this scope
   11 |     if (check == ture){break;}
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
int N, count;
  cin >> N;
  count = 0;
  while (true){
    bool check = false;
    if (N % 2 != 0) check = true;
    if check == ture break;
    N /= 2;
    count++;
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected '(' before 'check'
   11 |     if check == ture break;
      |        ^~~~~
      |        (
Language: C++

#include<iostream>
using namespace std;
int main()
{
int N, count;
  cin >> N;
  count = 0;
  while (true){
    bool check = false;
    if (N % 2 != 0) check = true;
    if check == ture break;
    N /= 2;
    count++
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected '(' before 'check'
   11 |     if check == ture break;
      |        ^~~~~
      |        (
a.cc:13:12: error: expected ';' before '}' token
   13 |     count++
      |            ^
      |            ;
   14 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int a;
	cin>>a;
	
	if(a==2||a==4||a==16||a==32||a==64)cout<<a<<endl;
	if(a>2&&a<4)cout<<"2"<<endl;
	if(a>4&&a<16)cout<<"4"<<endl;
	if(a>16&&a<32)cout<<"16"<<endl;
	if(a>32&&a<64)cout<<"32"<<endl;
	if(a>64&&a<=100)cout<<"64"<<endl;
	if(a<2)cout<<"1"<<endl;
	return 0;
	


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: expected '}' at end of input
   14 |         return 0;
      |                  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main() {
    int n, ret = 0;
    cin >> n;
    while (1) {
        if (n%2 == 0) {
            ret++;
            n =/ 2;
        } else {
            break;
        }
    }
    cout << ret << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected primary-expression before '/' token
   10 |             n =/ 2;
      |                ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: invalid type argument of unary '*' (have 'int')
   11 |   cout << 2**count << endl;
      |             ^~~~~~
Language: C++

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

int main() {
    int n
    cin >> n;
    int t=1;
    while(t<=n){
        t*=2;
    }
    cout << max(t/2,1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> n;
      |     ^~~
a.cc:8:14: error: 'n' was not declared in this scope
    8 |     while(t<=n){
      |              ^
Language: C++

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

int main() {
    int n
    cin >> n;
    int t=1
    while(t<=n){
        t*=2;
    }
    cout << max(t/2,1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> n;
      |     ^~~
a.cc:8:5: error: expected ',' or ';' before 'while'
    8 |     while(t<=n){
      |     ^~~~~
Language: C++

#include <iostream>
using namespace std;
 
int n;
 
int main(){
  cin >> n;
  for(int i = 0 ; i < 8; i++){
    if(n < (1<<(i+1))){
      cout << (1<<i) << endl;
      break ;
	}
　}
  return 0;
}

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

#include <iostream>
using namespace std;
 
int n;
int count=0;
 
int main(){
  cin >> n;
  for(int i = 0 ; i < 8; i++) {
    if(n < (1<<(i+1))) {
      cout << (1<<i) << endl;
      break ;
	}
　}
 
  return 0;
}

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

#include <iostream>
using namespace std;
 
int N;
int count=0;
 
int main(){
  cin >> N;
  for(int i = 0 ; i < 8; i++) {
    if(n < (1<<(i+1))) {
      cout << (1<<i) << endl;
      break ;
	}
　}

  return 0;
}

Compiler output:
a.cc:14:1: error: extended character 　 is not valid in an identifier
   14 | 　}
      | ^
a.cc: In function 'int main()':
a.cc:10:8: error: 'n' was not declared in this scope
   10 |     if(n < (1<<(i+1))) {
      |        ^
a.cc:14:1: error: '\U00003000' was not declared in this scope
   14 | 　}
      | ^~
Language: C++

#include <iostream>
using namespace std;
 
int N;
int count=0;
 
int main(){
  cin >> N;
  while(true){
    for(int i=0;i<N;++i){
      if(pow(2, i) < N) ++count;
      else break;
    }
  }
  int max = pow(2, count);
  cout << max << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'pow' was not declared in this scope
   11 |       if(pow(2, i) < N) ++count;
      |          ^~~
a.cc:15:13: error: 'pow' was not declared in this scope
   15 |   int max = pow(2, count);
      |             ^~~
Language: C++

#include <iostream>
using namespace std;

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

    // 操作が行える限り操作を繰り返す
    for (i = 0; i < N ; i++) {
      if (N % 2 == 0) {
        N /= 2;
    }
      else break;
    }
      cout  << N << endl;
}
  

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

#include <iostream>
using namespace std;

int N;
int count=0;

int main(){
  cin >> N;
  while(true){
    for(int i=0;i<N;++i){
      if(pow(2, i) < N) ++count;
      else break;
    }
  }
  cout << pow(2, count) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'pow' was not declared in this scope
   11 |       if(pow(2, i) < N) ++count;
      |          ^~~
a.cc:15:11: error: 'pow' was not declared in this scope
   15 |   cout << pow(2, count) << endl;
      |           ^~~
Language: C++

#include <iostream>
using namespace std;

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

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

    // 操作が行える限り操作を繰り返す
    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;
        }
          cout << A[i] << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: 'i' was not declared in this scope
   24 |           cout << A[i] << endl;
      |                     ^
Language: C++

#include <iostream>
using namespace std;

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

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

    // 操作が行える限り操作を繰り返す
    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;
        }
    }

    cout << A[i] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: 'i' was not declared in this scope
   26 |     cout << A[i] << endl;
      |               ^
Language: C++

#include <iostream>
using namespace std;

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

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

    // 操作が行える限り操作を繰り返す
    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;
        }
        
    }

    cout << i << endl;
}

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

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

#define lli long long int
#define LLI(n) \
  lli n;       \
  cin >> n;
#define LLIV(a, n)            \
  vector<lli> a(n);           \
  for (lli i = 0; i < n; i++) \
  {                           \
    cin >> a.at(i);           \
  };
#define STR(n) \
  string n;    \
  cin >> n;
#define Sort(n) sort(n.begin(), n.end());
#define Reve(n) reverse(n.begin(), n.end());
#define yes cout << "Yes" << endl;
#define no cout << "No" << endl;
#define C45(n) (n + 1) / 2
#define OUT(n) cout << n << endl;
#define SRC(n, c)                    \
  for (lli i = 0; i < s.size(); i++) \
  {                                  \
    if (s.at(i) == c)                \
    {                                \
      n++;                           \
    }                                \
  };
//こぴー
/*#define ZISYO(s, S)                  \
  for (lli i = 0; i < s.size(); i++) \
  {                                  \
    S.at(i) = s.at(i);               \
  }                                  \
  Sort(S) Reve(S) for (lli i = 0; i < s.size(); i++) { s.at(i) = S.at(i); };
*/

//素数
bool IsPrime(lli num)
{
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  long double sqrtNum = sqrt(num);
  for (lli i = 3; i <= sqrtNum; i += 2)
  {
    if (num % i == 0)
      return false;
  }
  return true;
}
//各桁の和
lli Sum(lli n)
{
  lli sum = 0;
  if (n < 0)
    return 0;
  while (n > 0)
  {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}

int main(void)
{
  ios::sync_with_stdio(false);
  LLI(n)
  
  if(n >= 64) {
    OUT(64)
  }
  else if(n => 32) {
    OUT(32)
  }
  else if(n >= 16) {
    OUT(16)
  }
  else if(n >= 8) {
    OUT(8)
  }
  else if(n >= 4) {
    OUT(4)
  }
  else if(n >= 2) {
    OUT(2)
  }
  else {
    OUT(1)
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:79:14: error: expected primary-expression before '>' token
   79 |   else if(n => 32) {
      |              ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  if(N >= 64){
    cout << 64 << endl:
  }
  if(N >= 32 && N < 64){
    cout << 32 << endl;
  }
  if(N >= 16 && N < 32){
    cout << 16 << endl;
  }
  if(N >= 8 && N < 16){
    cout << 8 << endl;
  }
  if(N >= 4 && N < 8){
    cout << 4 << endl;
  }
  if(N == 2 || N == 3){
    cout << 2 << endl;
  }
  if(N == 1){
    cout << 1 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before ':' token
    8 |     cout << 64 << endl:
      |                       ^
      |                       ;
Language: C++

#include<iostream>
int arr[7]={1,2,4,8,16,32,64,128};
int main()
{
    int n;
    std::cin>>n;
    for(int i=0;i<7;i++)
    {
        if(arr[i]>=n)
        {
            std::cout<<arr[n-1];break;
        }
    }return 0;
}

Compiler output:
a.cc:2:33: error: too many initializers for 'int [7]'
    2 | int arr[7]={1,2,4,8,16,32,64,128};
      |                                 ^
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
 
int N;
 
int main() {
    cin >> N;
    int beki = log2(N);
    cout << int pow(2, beki) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected primary-expression before 'int'
   10 |     cout << int pow(2, beki) << endl;
      |             ^~~
Language: C++

#include <iostream>
using namespace std;

int N;
int A[210];        

int main() {
    cin >> N;
    int beki = log2(N);
    cout << pow(2, beki) << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'log2' was not declared in this scope
    9 |     int beki = log2(N);
      |                ^~~~
a.cc:10:13: error: 'pow' was not declared in this scope
   10 |     cout << pow(2, beki) << endl;
      |             ^~~
Language: C++

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

int main(){
    int n; cin>>n;
    int ans=0;
    for(int i=1;i<n;i++){
        int t=0;
        int j=i
        while(j%2==0){
            j=j/2;
            t++;
          
            }
        ans=max(ans,t);
        }
    cout<<ans<<endl;
}


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

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

int main(){
    int n; cin>>n;
    int ans=0;
    for(int i=1;i<n;i++){
        int t=0;
        int j=i
        while(j%2==0||j=0){
            j=j/2;
            t++;
            }
        ans=max(ans,t);
        }
    cout<<ans<<endl;
}


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

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

int main(){
    int n; cin>>n;
    int ans=0;
    for(int i=1;i<n;i++){
        int t=0;
        int j=i
        while(j%2==0){
            j=j/2;
            t++;
            }
        ans=max(ans,t);
        }
    cout<<ans<<endl;
}


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

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

int main () {
  int n;
  cin>>n;
  double ans=0;
  
  for (int i=0;i<n;i++){
    ans = pow(2,i);
    if(ans>n){
      ans = ans/2;
      break;
    }
  }
  cout<<ans<<endl;
}


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;
long long a[1005]={1},b[1000]={1,2};
int main(){
int n;
cin >> n;
if (n==1)
{
cout << 1 << endl;
return ;
}
for (int i=2;i<=100;i++) {
b[i]=b[i-1]*2;
}
for (int i=1;i<=100;i++) if (b[i]<=n&&b[i+1]>n) {
cout << b[i] << endl;
return 0;
}
} 

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

#include <iostream>
using namespace std;

int main()
{
	int N;
	int answer;

	cin >> N;
   
    if      ( N == 1 )           { answer=1 }
    else if ( 2 <= N && N <  4 ) { answer=2 }
    else if ( 4 <= N && N <  8 ) { answer=4 }
    else if ( 8 <= N && N < 16 ) { answer=8 }
    else if (16 <= N && N < 32 ) { answer=16}
  	else if (32 <= N && N < 64 ) { answer=32}
  	else if (64 <= N ) { answer=64 }
  
	cout << answer << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:44: error: expected ';' before '}' token
   11 |     if      ( N == 1 )           { answer=1 }
      |                                            ^~
      |                                            ;
a.cc:12:44: error: expected ';' before '}' token
   12 |     else if ( 2 <= N && N <  4 ) { answer=2 }
      |                                            ^~
      |                                            ;
a.cc:13:44: error: expected ';' before '}' token
   13 |     else if ( 4 <= N && N <  8 ) { answer=4 }
      |                                            ^~
      |                                            ;
a.cc:14:44: error: expected ';' before '}' token
   14 |     else if ( 8 <= N && N < 16 ) { answer=8 }
      |                                            ^~
      |                                            ;
a.cc:15:45: error: expected ';' before '}' token
   15 |     else if (16 <= N && N < 32 ) { answer=16}
      |                                             ^
      |                                             ;
a.cc:16:49: error: expected ';' before '}' token
   16 |         else if (32 <= N && N < 64 ) { answer=32}
      |                                                 ^
      |                                                 ;
a.cc:17:39: error: expected ';' before '}' token
   17 |         else if (64 <= N ) { answer=64 }
      |                                       ^~
      |                                       ;
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int N;
	int temp;
	int tempCounter;
	int answerCounter;

	cin >> N;

  　// 1,2,4,8,16,32,64
    // 0,1,2,3, 4, 5, 6
    
    if      ( N == 1 )           { answerCounter=0; }
    else if ( 2 <= N && N <  4 ) { answerCounter=1; }
    else if ( 4 <= N && N <  8 ) { answerCounter=2; }
    else if ( 8 <= N && N < 16 ) { answerCounter=3; }
    else if (16 <= N && N < 32 ) { answerCounter=4; }
  	else if (32 <= N && N < 64 ) { answerCounter=5; }
  	else if (64 <= N ) { answerCounter=6; }
  
	cout << answerCounter << endl;
	return 0;
}


Compiler output:
a.cc:13:3: error: extended character 　 is not valid in an identifier
   13 |   　// 1,2,4,8,16,32,64
      |   ^
a.cc: In function 'int main()':
a.cc:13:3: error: '\U00003000' was not declared in this scope
   13 |   　// 1,2,4,8,16,32,64
      |   ^~
a.cc:17:5: error: 'else' without a previous 'if'
   17 |     else if ( 2 <= N && N <  4 ) { answerCounter=1; }
      |     ^~~~