criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;  

public class Main {
	public static Long Ln(long x){
        if(x==1){return 1;                                         
                } else {if(x>=2){return 2*Ln(x/2);                                                         
                                }else{return 0;                                                              
                                     }                                                                                                 
                       }                                
    }       
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        b = L(a);
		System.out.println(b);   
	}   
}



Compiler output:
Main.java:5: error: incompatible types: int cannot be converted to Long
        if(x==1){return 1;                                         
                        ^
Main.java:7: error: incompatible types: int cannot be converted to Long
                                }else{return 0;                                                              
                                             ^
Main.java:14: error: cannot find symbol
        b = L(a);
        ^
  symbol:   variable b
  location: class Main
Main.java:14: error: cannot find symbol
        b = L(a);
            ^
  symbol:   method L(Long)
  location: class Main
Main.java:15: error: cannot find symbol
		System.out.println(b);   
		                   ^
  symbol:   variable b
  location: class Main
5 errors
Language: Java

import java.util.*;  
public static Long Ln(long x){
        if(x==1){return 1;                                         
                } else {if(x>=2){return 2*Ln(x/2);                                                         
                                }else{return 0;                                                              
                                     }                                                                                                 
                       }                                
}       
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        b = L(a);
		System.out.println(b);   
	}   
}



Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static Long Ln(long x){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        b = L(a);
		System.out.println(b);   
	} 
    public static Long Ln(long x){
        if(x==1){return 1;
                                         } else {if(x>=2){return 2*Ln(x/2);
                                                         }else{return 0;
                                                              }                                                 
                                                }
                                }       
}



Compiler output:
Main.java:6: error: cannot find symbol
        b = L(a);
        ^
  symbol:   variable b
  location: class Main
Main.java:6: error: cannot find symbol
        b = L(a);
            ^
  symbol:   method L(Long)
  location: class Main
Main.java:7: error: cannot find symbol
		System.out.println(b);   
		                   ^
  symbol:   variable b
  location: class Main
Main.java:10: error: incompatible types: int cannot be converted to Long
        if(x==1){return 1;
                        ^
Main.java:12: error: incompatible types: int cannot be converted to Long
                                                         }else{return 0;
                                                                      ^
5 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        b = L(a);
		System.out.println(b);
    public static Long Ln(long x){if(x==1){return 1;
                                         } else {if(x>=2){return 2*Ln(x/2);
                                                         }else{return 0;
                                                              }                                                 
                                                }
                                }  
      
	}
}



Compiler output:
Main.java:8: error: illegal start of expression
    public static Long Ln(long x){if(x==1){return 1;
    ^
Main.java:16: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		//　敵の体力
		int h = sc.nextInt();
      
      	for(int i;h>Math.pow(2,i);i++){
          if(h<Math.pow(2,i+1)){
		    System.out.println(Math.pow(2,i+1)-1);
          }
		}
     }
}


Compiler output:
Main.java:8: error: variable i might not have been initialized
      	for(int i;h>Math.pow(2,i);i++){
      	                       ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		//　敵の体力
		int h = sc.nextInt();
      
      	for(int i;h>Math.pow(2,i);i++){
          if(h<Math.pow(2,i+1){
		    System.out.println(Math.pow(2,i+1)-1);
          }
		}
     }
}


Compiler output:
Main.java:9: error: ')' expected
          if(h<Math.pow(2,i+1){
                              ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		//　敵の体力
		int h = sc.nextInt();
      
      	for(int i;h>Math.pow(2,i);i++){
          if(h<Math.pow(2,i+1){
		    System.out.println(Math.pow(2,i+1)-1);
        }
	}
}


Compiler output:
Main.java:9: error: ')' expected
          if(h<Math.pow(2,i+1){
                              ^
Main.java:13: error: reached end of file while parsing
}
 ^
2 errors
Language: C++

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

const int MAXN=2e6+7;
long long a[MAXN];

int main()
{
	long long KO=1;
	cin>>n;
	
	for(int i=1; i<=KO; i++)
	{
		if(n==1)
			cout<<KO<< endl;
		else
		{
			a[i+1]=n/2;
			a[i]=n/2;
			KO+=1;
		}
	}
	
	cout<<KO<< endl;
	return 0;
}

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

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

long long a[KO+1];

int main()
{
	long long KO=1;
	cin>>n;
	
	for(int i=1; i<=KO; i++)
	{
		if(n==1)
			cout<<KO<< endl;
		else
		{
			a[i+1]=n/2;
			a[i]=n/2;
			KO+=1;
		}
	}
	
	cout<<KO<< endl;
	return 0;
}

Compiler output:
a.cc:4:13: error: 'KO' was not declared in this scope
    4 | long long a[KO+1];
      |             ^~
a.cc: In function 'int main()':
a.cc:9:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |         cin>>n;
      |              ^
      |              yn
a.cc:17:25: error: 'a' was not declared in this scope
   17 |                         a[i+1]=n/2;
      |                         ^
Language: C++

#pragma GCC optimize("Ofast",3,"inline")
#include<bits/stdc++.h>
using namespace std;
#define fir first
#define sec second
#define m_p make_pair
#define y1 ygftgfgcdtfgxffgx
#define y2 yfdsesgvtyghftfvv
#define x1 xvyr6cf6fgcfgf676
#define x2 xcr6rfc5r66y6r6fr
#define up_bound upper_bound
#define low_bound lower_bound
#define next_per next_permutation
#define pb push_back
#define i_to_s to_string
typedef priority_queue<int> p_queue;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
int pow1(int n, int p){
	if(p==0)	return 1;
	int x=pow1(n, p/2);
	x=(x*x)%mod;
	if(p%2==0)
		return x;
	else
		return (x*n)%mod;
}
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	int h;
	cin>>h;
	int c=0;
	int a=1;
	while(h>0)
	{
		c+=a;
		h/=2;
		a*=2;
	}
	cout<<c<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int pow1(int, int)':
a.cc:24:17: error: 'mod' was not declared in this scope; did you mean 'modf'?
   24 |         x=(x*x)%mod;
      |                 ^~~
      |                 modf
Language: C++

#include<iostream>

using namespace std;

int main(){
 long long H;
  cin >> H;
  
  // 2-> 1,1, -> x 3
  // 4-> 2,2 -> 1,1,1,1 -> x 7
  // 5-> 2,2 -> 1,1,1,1 -> x 7
  // 8-> 4,4 -> 2,2,2,2 -> 1,1,1,1,1,1,1,1 15
  
  // 2^(n)-1
  
  int tmp = log2(H); //切り捨て
  
  cout << pow(2,tmp+1) -1 << endl;
  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'log2' was not declared in this scope
   16 |   int tmp = log2(H); //切り捨て
      |             ^~~~
a.cc:18:11: error: 'pow' was not declared in this scope
   18 |   cout << pow(2,tmp+1) -1 << endl;
      |           ^~~
Language: C++

#include <iostream>
#include <cmath>

int main() {
  using std;
  double h;
  cin >> h;
  cout << h*floor(log2(h))-1.0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected nested-name-specifier before 'std'
    5 |   using std;
      |         ^~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> h;
      |   ^~~
      |   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:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout << h*floor(log2(h))-1.0;
      |   ^~~~
      |   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 <bits/stdc++.h>
using namespace std;
 
int main(){
  long H;
  cin >> H;
  long cnt = 0;
  long i = 0;
  while(H>=1){
    cnt += pow(2, i);
    i++;
    H /=2
  }
  cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected ';' before '}' token
   12 |     H /=2
      |          ^
      |          ;
   13 |   }
      |   ~
Language: C++

from math import floor


def f(N):
    if N == 1:
        return 1
    return f(floor(N / 2)) * 2 + 1


def main():
    N = int(input())
    print(f(N))


if __name__ == '__main__':
    main()

Compiler output:
a.cc:15:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   15 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from math import floor
      | ^~~~
Language: C++

int main()
{
  long long int n;
  cin>>n;
  long long int count=0;
  long long int fin=0;
  for(int i=0;n>=1;i++)
  {
    n=n/2;
    fin=pow(2,i);
    count=count+fin;
  }
  cout<<count;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>n;
      |   ^~~
a.cc:10:9: error: 'pow' was not declared in this scope
   10 |     fin=pow(2,i);
      |         ^~~
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   13 |   cout<<count;
      |   ^~~~
      |   count
Language: C++

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

long long h;

long long rec(long long x){
    if(x == 1) return 1;
    return rec(x / 2) * 2;
}

int main(){
    cin >> h;
    cout << ans(h);
	return 0;  
}

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

#include<bits/stdc++.h>
#define long long ll
using namespace std;
int main(){
	ll h, k, t;
  	cin>>h;
  	ll t = 0;
  	ll k = 0;
  	while( h>0){
    	t += k;
      	h /= 2;
      	k *= 2;
    
    }
  	cout<<t;
  
  return 0;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll h, k, t;
      |         ^~
a.cc:6:14: error: 'h' was not declared in this scope
    6 |         cin>>h;
      |              ^
a.cc:7:11: error: expected ';' before 't'
    7 |         ll t = 0;
      |           ^~
      |           ;
a.cc:8:11: error: expected ';' before 'k'
    8 |         ll k = 0;
      |           ^~
      |           ;
a.cc:10:9: error: 't' was not declared in this scope; did you mean 'tm'?
   10 |         t += k;
      |         ^
      |         tm
a.cc:10:14: error: 'k' was not declared in this scope
   10 |         t += k;
      |              ^
a.cc:15:15: error: 't' was not declared in this scope; did you mean 'tm'?
   15 |         cout<<t;
      |               ^
      |               tm
Language: C++

#include<bits/stdc++.h>
#define long long ll
using namespace std;
int main(){
	ll h;
  	cin>>h;
  	ll t = 0;
  	ll k = 0;
  	while( h>0){
    	t += k;
      	h /= 2;
      	k *= 2;
    
    }
  	cout<<t;
  
  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll h;
      |         ^~
a.cc:6:14: error: 'h' was not declared in this scope
    6 |         cin>>h;
      |              ^
a.cc:7:11: error: expected ';' before 't'
    7 |         ll t = 0;
      |           ^~
      |           ;
a.cc:8:11: error: expected ';' before 'k'
    8 |         ll k = 0;
      |           ^~
      |           ;
a.cc:10:9: error: 't' was not declared in this scope; did you mean 'tm'?
   10 |         t += k;
      |         ^
      |         tm
a.cc:10:14: error: 'k' was not declared in this scope
   10 |         t += k;
      |              ^
a.cc:15:15: error: 't' was not declared in this scope; did you mean 'tm'?
   15 |         cout<<t;
      |               ^
      |               tm
Language: C++

ll rec(ll h) {
  if (h == 1) return 1;
  return 2 * rec(h / 2) + 1;
}


int main(int argc, char const* argv[])
{
  ll h;
  cin >> h;

  cout << rec(h) << endl;

  return 0;
}

Compiler output:
a.cc:1:1: error: 'll' does not name a type
    1 | ll rec(ll h) {
      | ^~
a.cc: In function 'int main(int, const char**)':
a.cc:9:3: error: 'll' was not declared in this scope
    9 |   ll h;
      |   ^~
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> h;
      |   ^~~
a.cc:10:10: error: 'h' was not declared in this scope
   10 |   cin >> h;
      |          ^
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << rec(h) << endl;
      |   ^~~~
a.cc:12:11: error: 'rec' was not declared in this scope
   12 |   cout << rec(h) << endl;
      |           ^~~
a.cc:12:21: error: 'endl' was not declared in this scope
   12 |   cout << rec(h) << endl;
      |                     ^~~~
Language: C++

#include<bits.stdc++.h>
using namespace std;
#define ll long

int main(){
  ll h;
  ll cnt=1;
  std::cin>>h;
  ll k=1;
  
  while(h>=0)
  {
    h=h/2;
    if(h>0)
    {
      cnt+=ll(1<<k);
      k+=1;
    }
  }
  std::cout<<cnt;
  return 0;
}

Compiler output:
a.cc: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;
typeder long long ll;

int dfs(ll n){
  if(n==1){
    return 1;
  }else{
    ll ret;
    ret = dfs(n/2);
    return ret*2;
  }
}

int main(){
  ll n; cin >> n;
  cout << dfs(n) << endl;
}

Compiler output:
a.cc:3:1: error: 'typeder' does not name a type; did you mean 'typedef'?
    3 | typeder long long ll;
      | ^~~~~~~
      | typedef
a.cc:5:9: error: 'll' was not declared in this scope
    5 | int dfs(ll n){
      |         ^~
a.cc: In function 'int main()':
a.cc:16:3: error: 'll' was not declared in this scope
   16 |   ll n; cin >> n;
      |   ^~
a.cc:16:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   16 |   ll n; cin >> n;
      |                ^
      |                yn
a.cc:17:14: error: 'dfs' cannot be used as a function
   17 |   cout << dfs(n) << endl;
      |           ~~~^~~
Language: C++

#include"bits/stdc++.h"
int main()
{
    printf("%lld\n",1ll<<static_cast<long long>(std::ceil(std::log2([]{long long ret;std::cin>>ret;return ret;}()+1))))-1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:122: error: expected ';' before ')' token
    4 |     printf("%lld\n",1ll<<static_cast<long long>(std::ceil(std::log2([]{long long ret;std::cin>>ret;return ret;}()+1))))-1);
      |                                                                                                                          ^
      |                                                                                                                          ;
Language: C++

#include"bits/stdc++.h"
using namespace std;
using ll=long long;
int main()
{
    cout<<(1ll<<static_cast<ll>(ceil(log2([&cin]{ll ret;cin>>ret;return ret}()+1))))-1<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:45: warning: capture of variable 'std::cin' with non-automatic storage duration
    6 |     cout<<(1ll<<static_cast<ll>(ceil(log2([&cin]{ll ret;cin>>ret;return ret}()+1))))-1<<endl;
      |                                             ^~~
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:62:18: note: 'std::istream std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc: In lambda function:
a.cc:6:76: error: expected ';' before '}' token
    6 |     cout<<(1ll<<static_cast<ll>(ceil(log2([&cin]{ll ret;cin>>ret;return ret}()+1))))-1<<endl;
      |                                                                            ^
      |                                                                            ;
Language: C++

#include<iostream>
using namespace std;
typedef long long ll;
int main(){
  ll h;
  cin >> h;
  ll a = 0,b = 0;
  ll t = h;
  while(t!= 0){
    a++;
    b += t%2;
    t/=2;
  }
  cout << (ll)pow(2,a-1)+b << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'pow' was not declared in this scope
   14 |   cout << (ll)pow(2,a-1)+b << endl;
      |               ^~~
Language: C++

#include<iostream>
using namespace std;
typedef long long ll;
int main(){
  ll h;
  cin >> h;
  ll a = 0,b = 0;
  ll t = h;
  while(t!= 0){
    a++;
    b += t%2;
    t/=2;
  }
  cout << llpow(2,a-1)+b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'llpow' was not declared in this scope
   14 |   cout << llpow(2,a-1)+b << endl;
      |           ^~~~~
Language: C++

package main
 
import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)
 
func main() {
	H := nextInt64()
    fmt.Println(caracal(H))
}

func caracal(h int64) int64 {
  if h == 1 {
     return 1 
  }
  return caracal(h / 2) * 2 + 1
}

var stdin = initStdin()
 
func initStdin() *bufio.Scanner {
	bufsize := 1 * 1024 * 1024 // 1 MB
	var stdin = bufio.NewScanner(os.Stdin)
	stdin.Buffer(make([]byte, bufsize), bufsize)
	stdin.Split(bufio.ScanWords)
	return stdin
}
 
func nextString() string {
	stdin.Scan()
	return stdin.Text()
}
 
func nextBytes() []byte {
	stdin.Scan()
	return stdin.Bytes()
}
 
func nextInt() int {
	i, _ := strconv.Atoi(nextString())
	return i
}
 
func nextInt64() int64 {
	i, _ := strconv.ParseInt(nextString(), 10, 64)
	return i
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:15:1: error: 'func' does not name a type
   15 | func caracal(h int64) int64 {
      | ^~~~
a.cc:22:1: error: 'var' does not name a type
   22 | var stdin = initStdin()
      | ^~~
a.cc:32:1: error: 'func' does not name a type
   32 | func nextString() string {
      | ^~~~
a.cc:37:1: error: 'func' does not name a type
   37 | func nextBytes() []byte {
      | ^~~~
a.cc:42:1: error: 'func' does not name a type
   42 | func nextInt() int {
      | ^~~~
a.cc:47:1: error: 'func' does not name a type
   47 | func nextInt64() int64 {
      | ^~~~
Language: C++

package main
 
import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)
 
func main() {
	H := nextInt64()
    fmt.Println(caracal(H))
}

func caracal(h int64): int64 {
  if h == 1 {
     return 1 
  }
  return caracal(h / 2) * 2 + 1
}

var stdin = initStdin()
 
func initStdin() *bufio.Scanner {
	bufsize := 1 * 1024 * 1024 // 1 MB
	var stdin = bufio.NewScanner(os.Stdin)
	stdin.Buffer(make([]byte, bufsize), bufsize)
	stdin.Split(bufio.ScanWords)
	return stdin
}
 
func nextString() string {
	stdin.Scan()
	return stdin.Text()
}
 
func nextBytes() []byte {
	stdin.Scan()
	return stdin.Bytes()
}
 
func nextInt() int {
	i, _ := strconv.Atoi(nextString())
	return i
}
 
func nextInt64() int64 {
	i, _ := strconv.ParseInt(nextString(), 10, 64)
	return i
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:15:1: error: 'func' does not name a type
   15 | func caracal(h int64): int64 {
      | ^~~~
a.cc:22:1: error: 'var' does not name a type
   22 | var stdin = initStdin()
      | ^~~
a.cc:32:1: error: 'func' does not name a type
   32 | func nextString() string {
      | ^~~~
a.cc:37:1: error: 'func' does not name a type
   37 | func nextBytes() []byte {
      | ^~~~
a.cc:42:1: error: 'func' does not name a type
   42 | func nextInt() int {
      | ^~~~
a.cc:47:1: error: 'func' does not name a type
   47 | func nextInt64() int64 {
      | ^~~~
Language: C++

#include <bits/stdc++.h>
2.long long saiki(long long H)
3.{
4.  if(H>1)return 2*saiki(H/2)+1;
5.  return 1;
6.}
7.int main()
8.{
9.  long long H;
10.  scanf("%lld",&H);
11.  printf("%lld",saiki(H));
12.}


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.long long saiki(long long H)
      | ^~~~~~
a.cc:7:1: error: expected unqualified-id before numeric constant
    7 | 7.int main()
      | ^~~~~
Language: C++

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

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)   FOR(i,0,n)
#define MOD 1000000007

typedef long long int ll;

const ll INF=(ll)1e18;

map<ll,ll> mp;


ll dp(ll n){
  if(mp[n])return mp[n];

  if(n == 1){
    mp[n] = 1;
    return 1;
  }else{
    ll ret = 2 * dp(n/2);
    mp[n] = ret; 
    return ret;
  }
}

int main(){
  ll h;
  cin >> h;
  dp(h);
  ll ans=0;
  for(auto x : mp) {
        ans += x.second;
  }
  cout << ans <<
}



Compiler output:
a.cc: In function 'int main()':
a.cc:37:1: error: expected primary-expression before '}' token
   37 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

int main(){
  int h, n=1, ans=0;

  cin>> h;

  while(1){
    if(h>1){
      h/=2;
      ans+=n;
      n*=2;
    }else{
      ans+=n;
      break;
    }
  }

  count<< ans <<endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: 'count' was not declared in this scope
   21 |   count<< ans <<endl;
      |   ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  long long n; cin>>n;
  long long ans = 0ll;
  long long p = 1ll;
  while(n>0)
  {
    ans += p;
    p *= 2
     n /= 2;
  }
  cout<<ans<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected ';' before 'n'
   11 |     p *= 2
      |           ^
      |           ;
   12 |      n /= 2;
      |      ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  long long n; cin>>n;
  long long ans = 0;
  long long p = 1;
  while(n>0)
  {
    ans += p;
    p *= 2
     n /= 2;
  }
  cout<<ans<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected ';' before 'n'
   11 |     p *= 2
      |           ^
      |           ;
   12 |      n /= 2;
      |      ~
Language: C++

typedef long long ll;
int main() {
    ll H;
    cin >> H;
    ll k = 1;
    ll t = 0;
    while (H > 0) {
        t += k;
        H /= 2;
        k *= 2;
    }
    cout << t << "\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> H;
      |     ^~~
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << t << "\n";
      |     ^~~~
Language: C++

#include <iostream>
#include <math>
using namespace std;
int main(){
 
  
	long int N;
  cin >> N;
  cout<< (2,(floor(log2(N))+1)-1)) <<endl;
	return 0;
}

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

#include <iostream>
#include <math>

int main(){

  
	long int N;
  cin >> N;
  cout<< (2,(floor(log2(N))+1)-1)) <<endl;
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;

vector<unsigned long> table;

// valueはreturn回で倒せるよー的な
ull sub(ull value);

int main()
{
    ull H;
    cin >> H;
    cout << sub(H);

    cout << "\n";
    return 0;
}

ull sub(ull value)
{
    if(value == 1)
    {
        return 1;
    }
    else
    {
        // テーブルにすでに値があればそれを返す
        {
            ull half=0;
            if(value % 2 == 0)
            {
                half = value / 2;
                ull table_value = sub(half)* 2  + 1;
                // table.at(value) = table_value;
                return table_value;
            }
            else
            {
                half = value / 2;
                ull table_value = sub(half) * 2 + 1;
                // table.at(value) = table_value;
                return table_value;
            }
        }
    }
}g

Compiler output:
a.cc:48:2: error: 'g' does not name a type
   48 | }g
      |  ^
Language: C++

#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
typedef long long ll;
using namespace std;
const ll mod=1000000007;
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;

int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    ll n,ans=1;
    cin>>n;
    while(n){
        n/=2;
        ans*=2
    }
    cout<<ans-1<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: expected ';' before '}' token
   17 |         ans*=2
      |               ^
      |               ;
   18 |     }
      |     ~
Language: C

#include <stdio.h>
long long int add_2(int a);
int main(void){
  long long int h;
  scanf("%lld", &h);
  long long int count = 1;
  long long int odd = 1;
  
  while(1){
    if(h%odd==h){
      printf("%lld", add_2(count -1));
      return 0;
    }
    count ++;
  }
  return 0;
}

long long int add_2(int a){
  long long int b=1;
  long long int odd=1;
  for(int i=0; i<a; i++){
    b = b + odd;
    add = add*2;
  }
  return b;
}


Compiler output:
main.c: In function 'add_2':
main.c:24:5: error: 'add' undeclared (first use in this function); did you mean 'odd'?
   24 |     add = add*2;
      |     ^~~
      |     odd
main.c:24:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
long long int add_2(int a);
int main(void){
  long long int h;
  scanf("%lld", &h);
  long long int count = 1;
  long long int odd = 1;
  
  while(1){
    if(h%odd==h){
      printf("%lld", add_2(count -1));
      return 0;
    }
    count ++;
  }
  return 0;
}

long long int add_2(int a){
  long long int b=1;
  long long int odd=1
  for(int i=0; i<a; i++){
    b = b + odd;
    add = add*2;
  }
  return b;
}


Compiler output:
main.c: In function 'add_2':
main.c:22:3: error: expected ',' or ';' before 'for'
   22 |   for(int i=0; i<a; i++){
      |   ^~~
main.c:22:16: error: 'i' undeclared (first use in this function)
   22 |   for(int i=0; i<a; i++){
      |                ^
main.c:22:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:24: error: expected ';' before ')' token
   22 |   for(int i=0; i<a; i++){
      |                        ^
      |                        ;
main.c:22:24: error: expected statement before ')' token
main.c:24:5: error: 'add' undeclared (first use in this function); did you mean 'odd'?
   24 |     add = add*2;
      |     ^~~
      |     odd
Language: C

#include <stdio.h>
long long int add_2(int a);
int main(void){
  long long int h;
  scanf("%lld", &h);
  long long int count = 1;
  long long int odd = 1;
  
  while(1){
    if(h%odd==h){
      printf("%lld", add_2(count -1));
      return 0;
    }
    count ++;
  }
  return 0;
}

long long int add_2(int a){
  long long int b=1;
  long long int odd=1
  for (int i=0; i<a; i++){
    b = b + odd;
    add = add*2;
  }
  return b;
}


Compiler output:
main.c: In function 'add_2':
main.c:22:3: error: expected ',' or ';' before 'for'
   22 |   for (int i=0; i<a; i++){
      |   ^~~
main.c:22:17: error: 'i' undeclared (first use in this function)
   22 |   for (int i=0; i<a; i++){
      |                 ^
main.c:22:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:25: error: expected ';' before ')' token
   22 |   for (int i=0; i<a; i++){
      |                         ^
      |                         ;
main.c:22:25: error: expected statement before ')' token
main.c:24:5: error: 'add' undeclared (first use in this function); did you mean 'odd'?
   24 |     add = add*2;
      |     ^~~
      |     odd
Language: C

#include <stdio.h>
long long int add_2(int a);
int main(void){
  long long int h;
  scanf("%lld", &h);
  long long int count = 1;
  long long int odd = 1;
  
  while(1){
    if(h%odd==h){
      printf("%lld", add_2(count -1));
      return 0;
    }
    count ++;
  }
  return 0;
}

long long int add_2(int a){
  long long int b=1;
  long long int odd=1
  for (int i=0 i<a; i++){
    b = b + odd;
    add = add*2;
  }
  return b;
}


Compiler output:
main.c: In function 'add_2':
main.c:22:3: error: expected ',' or ';' before 'for'
   22 |   for (int i=0 i<a; i++){
      |   ^~~
main.c:22:21: error: 'i' undeclared (first use in this function)
   22 |   for (int i=0 i<a; i++){
      |                     ^
main.c:22:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:24: error: expected ';' before ')' token
   22 |   for (int i=0 i<a; i++){
      |                        ^
      |                        ;
main.c:22:24: error: expected statement before ')' token
main.c:24:5: error: 'add' undeclared (first use in this function); did you mean 'odd'?
   24 |     add = add*2;
      |     ^~~
      |     odd
Language: Java

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

int main(){
  long h;
  cin >> h;
  vector<long> H(0);
  H.push_back(h);
  long no = 0;
  long total = 0;
  long s;
  while(true){
    for(int i=0;i<H.size();i++){
      cout << H[i];
    }
    cout << endl;
    sort(H.begin(), H.end());
    no = 0;
    cout << endl;
    for(int i=0;i<H.size();i++){
      if(H[i]!=0){
        no += 1;
      }
    }
    if(no==0){
      break;
    }else if(H[(H.size()-no)]==1){
      total += 1;
      H[(H.size()-no)]=0;
    }else{
      total += 1;
      s = H.size()-no;
      H.push_back(H[s]/2);
      H.push_back(H[s]/2);
      H[s]=0;
    }
  }
  cout << total;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:6: error: not a statement
  cin >> h;
      ^
Main.java:14: error: not a statement
      cout << H[i];
           ^
Main.java:16: error: not a statement
    cout << endl;
         ^
Main.java:19: error: not a statement
    cout << endl;
         ^
Main.java:38: error: not a statement
  cout << total;
       ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: ';' expected
  vector<long> H(0);
                ^
9 errors
Language: Java

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

int main(){
  long h;
  cin >> h;
  vector<long> H(0);
  H.push_back(h);
  long no = 0;
  long total = 0;
  long s;
  while(true){
    for(int i=0;i<H.size();i++){
      cout << H[i];
    }
    cout << endl;
    sort(H.begin(), H.end());
    no = 0;
    for(int i=0;i<H.size();i++){
      cout << H[i];
    }
    cout << endl;
    for(int i=0;i<H.size();i++){
      if(H[i]!=0){
        no += 1;
      }
    }
    if(no==0){
      break;
    }else if(H[(H.size()-no)]==1){
      total += 1;
      H[(H.size()-no)]=0;
    }else{
      total += 1;
      s = H.size()-no;
      H.push_back(H[s]/2);
      H.push_back(H[s]/2);
      H[s]=0;
    }
  }
  cout << total;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:6: error: not a statement
  cin >> h;
      ^
Main.java:14: error: not a statement
      cout << H[i];
           ^
Main.java:16: error: not a statement
    cout << endl;
         ^
Main.java:20: error: not a statement
      cout << H[i];
           ^
Main.java:22: error: not a statement
    cout << endl;
         ^
Main.java:41: error: not a statement
  cout << total;
       ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: ';' expected
  vector<long> H(0);
                ^
10 errors
Language: C

#include <stdio.h>
#include <math.h>

int main(void){

    double H = 0.0;
    double o_H = 4.0;
    double tmp_H = 0.0
    long sum = 0;
    long beki = 1;

    scanf("%lf", &H);

    //H = log(H);
    tmp_H = H;

    while (o_H > 1.0){
        sum = sum + beki;
        beki = beki * 2;
        o_H = tmp_H / 2;
        printf("%lf\n", (o_H));
        tmp_H = ceil(o_H);
    }
    if (log(H) == ceil(log(H))){
        beki = beki * 2;
        sum = sum + beki;
    }



    printf("%ld", sum);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: expected ',' or ';' before 'long'
    9 |     long sum = 0;
      |     ^~~~
main.c:18:9: error: 'sum' undeclared (first use in this function)
   18 |         sum = sum + beki;
      |         ^~~
main.c:18:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <math.h>

int main(void){

    double H = 0.0;
    double o_H = 4.0;
    double tmp_H = 0.0
    long sum = 0;
    long beki = 1;

    scanf("%lf", &H);

    //H = log(H);
    tmp_H = H;

    while (o_H > 1.0){
        sum = sum + beki;
        beki = beki * 2;
        o_H = tmp_H / 2;
        printf("%lf\n", (o_H));
        tmp_H = ceil(o_H);
    }
    if (log(H) == ceil(log(H))){
               beki = beki * 2;
        sum = sum + beki;
    }



    printf("%ld", sum);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: expected ',' or ';' before 'long'
    9 |     long sum = 0;
      |     ^~~~
main.c:18:9: error: 'sum' undeclared (first use in this function)
   18 |         sum = sum + beki;
      |         ^~~
main.c:18:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

m=int(input())
def wow(t):
  i=1
  while(t>0):
    t=t//2
    i=i+1
  return(i)
def pow_r(x, n):
  ans=0
  while(n>1):
    print(n)
    if(x%2==0):
      x*=x
      n=n//2     
    else:
      ans*=x
      n=n-1
  return(ans)

if(m%2==0):
  print(wow(m))
  print(pow_r(2,wow(m))-1)
else:
  print(pow_r(2,wow(m))-1)


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

#include <stdio.h>

int main(void){
  long long int h;
  scanf("%lld", &h);
  long long int count = 1;
  long long int odd = 1;
  
  while(1){
    if(h%odd==h){
      printf("%lld", add_2(count -1));
      return 0;
    }
    count ++;
  }
  return 0;
}

long long int add_2(int a){
  long long int b=1;
  long long int odd=1
  for (int i=0 i<a; i++){
    b = b + odd;
    add = add*2;
  }
  return b;
}


Compiler output:
main.c: In function 'main':
main.c:11:22: error: implicit declaration of function 'add_2' [-Wimplicit-function-declaration]
   11 |       printf("%lld", add_2(count -1));
      |                      ^~~~~
main.c: At top level:
main.c:19:15: error: conflicting types for 'add_2'; have 'long long int(int)'
   19 | long long int add_2(int a){
      |               ^~~~~
main.c:11:22: note: previous implicit declaration of 'add_2' with type 'int()'
   11 |       printf("%lld", add_2(count -1));
      |                      ^~~~~
main.c: In function 'add_2':
main.c:22:3: error: expected ',' or ';' before 'for'
   22 |   for (int i=0 i<a; i++){
      |   ^~~
main.c:22:21: error: 'i' undeclared (first use in this function)
   22 |   for (int i=0 i<a; i++){
      |                     ^
main.c:22:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:24: error: expected ';' before ')' token
   22 |   for (int i=0 i<a; i++){
      |                        ^
      |                        ;
main.c:22:24: error: expected statement before ')' token
main.c:24:5: error: 'add' undeclared (first use in this function); did you mean 'odd'?
   24 |     add = add*2;
      |     ^~~
      |     odd
Language: C++

#include <iostream>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <stdio.h> 
#include <map>
#include <cmath>
#include <cstring>
#include <stack>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
	int n;
	cin>>n;
	if(n==1000000000000) {
		cout << #include <iostream>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <stdio.h> 
#include <map>
#include <cmath>
#include <cstring>
#include <stack>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
	int n;
	cin>>n;
	
	map<long long, pair<long long, pair<long long, long long> > > mp;
	mp[1] = make_pair(1,make_pair(1,1));
	mp[2] = make_pair(2,make_pair(3,3));
	mp[4] = make_pair(4,make_pair(7,7));
	mp[8] = make_pair(8,make_pair(15,15));
	long long num = 16;
	while(true) {
		if(num > (1<<63)) {
			break;
		}
		mp[num] = make_pair(num, make_pair(num-1, (mp[num/2].second.second*2LL)+1LL));
		num = num * 2;
	}
	
	for (map<long long, pair<long long, pair<long long, long long> > >::iterator it = mp.begin(); it!=mp.end(); it++) {
		if(it->first >= n) {
			cout << it->second.second.second;
			break;
		}
	}
	return 0;
}
;
		return 0;
	}
	map<long long, pair<long long, pair<long long, long long> > > mp;
	mp[1] = make_pair(1,make_pair(1,1));
	mp[2] = make_pair(2,make_pair(3,3));
	mp[4] = make_pair(4,make_pair(7,7));
	mp[8] = make_pair(8,make_pair(15,15));
	long long num = 16;
	while(true) {
		if(num > 1099511627779) {
			break;
		}
		mp[num] = make_pair(num, make_pair(num-1, (mp[num/2].second.second*2LL)+1LL));
		num = num * 2;
	}
	
	for (map<long long, pair<long long, pair<long long, long long> > >::iterator it = mp.begin(); it!=mp.end(); it++) {
		if(it->first >= n) {
			cout << it->second.second.second;
			break;
		}
	}
	return 0;
}


Compiler output:
a.cc:21:25: error: stray '#' in program
   21 |                 cout << #include <iostream>
      |                         ^
a.cc: In function 'int main()':
a.cc:21:26: error: 'include' was not declared in this scope
   21 |                 cout << #include <iostream>
      |                          ^~~~~~~
a.cc:21:43: error: expected primary-expression before '>' token
   21 |                 cout << #include <iostream>
      |                                           ^
a.cc:35:1: error: expected primary-expression before 'using'
   35 | using namespace std;
      | ^~~~~
a.cc:37:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   37 | int main() {
      |         ^~
a.cc:37:9: note: remove parentheses to default-initialize a variable
   37 | int main() {
      |         ^~
      |         --
a.cc:37:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:37:12: error: a function-definition is not allowed here before '{' token
   37 | int main() {
      |            ^
Language: Java

import java.util.Scanner;
 
public class Main{
 
public static void main(String[] args) {
  
double result = 0;
int p = 0;
int count = 0;
 
Scanner scanner = new Scanner(System.in);
int H = scanner.nextInt();
  
while(H=1){
  H = H/2;
  count += 1;
}

for(int i =0; i<count; i++){
  result = result + Math.pow(2, count);
}
  
System.out.println(int(result));
  
}
}
  

  

Compiler output:
Main.java:23: error: '.class' expected
System.out.println(int(result));
                      ^
Main.java:23: error: not a statement
System.out.println(int(result));
                       ^
Main.java:23: error: ';' expected
System.out.println(int(result));
                             ^
3 errors
Language: C++

#include<iostream>
using namespace std;
int main()
{
	// 入力 h:体力
	unsigned long long h;


	cin >> h;
	unsigned long long count = 0;
	while (1) {
		++count;
		h /= 2;
		if (h == 0) {
			break;
		}
	}

	unsigned long long ans = 0;
	for (unsigned long long i = 0; i < count; ++i) {
		ans += pow(2, i);
	}

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

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

#include <bits/stdc++.h>
#include <string>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
using Graph = vector<vector<int>>;


int facctorialMethod(int k){
   int sum = 1;
   REP(i,k) {
    sum *= 2;
   }
   return sum;
}
int main() {
  int H;
  cin >> H;
  ll ans = 0;

  int count = 0;

  while(!H = 0) {
    H /= 2;
    count++;
  }

  REP(i, count) {
    ans += facctorialMethod(i);
  }
  
  cout << ans << endl;
  return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
	// 入力 h:体力
	unsigned long long h;


	cin >> h;
	int count = 0;
	while (1) {
		++count;
		h /= 2;
		if (h == 0) {
			break;
		}
	}

	int ans = 0;
	for (int i = 0; i < count; ++i) {
		ans += pow(2, i);
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: 'pow' was not declared in this scope
   21 |                 ans += pow(2, i);
      |                        ^~~
Language: Java

import java.util.Scanner;
 
public class Main{
 
public static void main(String[] args) {
  
int result = 0;
int p = 0;
int count = 0;
 
Scanner scanner = new Scanner(System.in);
int H = scanner.nextInt();
  
while(H=1){
  H = H/2;
  count += 1;
}

for(int i =0; i<count; i++){
  result = result + Math.pow(2, count);
}
  
System.out.println(reslut);
  
}
}
  

  

Compiler output:
Main.java:14: error: incompatible types: int cannot be converted to boolean
while(H=1){
       ^
Main.java:20: error: incompatible types: possible lossy conversion from double to int
  result = result + Math.pow(2, count);
                  ^
Main.java:23: error: cannot find symbol
System.out.println(reslut);
                   ^
  symbol:   variable reslut
  location: class Main
3 errors
Language: Java

import java.io.*;
import java.lang.math;
public class CaracalMonster
  {
  public static void main(String [] args)
    {
    Scanner sc= new Scanner(System.in);
    System.out.print("Enter health of monster");
    int x= sc.nextInt();
    long count= 1;
    if(x== 1)
      
      System.out.println(1);
      
      
      else
        {
      int n=1;
      while(x>=1)
        {
        x=x/2;
        count= count + math.pow(2,n);
        n++;
        }
        
    System.out.print(count);
        }
    }
  }


        
        
        
        
        
    

Compiler output:
Main.java:3: error: class CaracalMonster is public, should be declared in a file named CaracalMonster.java
public class CaracalMonster
       ^
Main.java:2: error: cannot find symbol
import java.lang.math;
                ^
  symbol:   class math
  location: package java.lang
Main.java:7: error: cannot find symbol
    Scanner sc= new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class CaracalMonster
Main.java:7: error: cannot find symbol
    Scanner sc= new Scanner(System.in);
                    ^
  symbol:   class Scanner
  location: class CaracalMonster
Main.java:22: error: cannot find symbol
        count= count + math.pow(2,n);
                       ^
  symbol:   variable math
  location: class CaracalMonster
5 errors
Language: C++

H=gets.to_i
c=1
a=0
while H>0{
a+=c
H/=2
c*=2
}
p a

Compiler output:
a.cc:1:1: error: 'H' does not name a type
    1 | H=gets.to_i
      | ^
a.cc:9:1: error: 'p' does not name a type
    9 | p a
      | ^
Language: Java

import java.util.Scanner;
import java.util.*;
 
public class Main {
	public static void main(String[] args) {
        try (Scanner scn = new Scanner(System.in)) {
            long h = scn.nextLong();
            long tekicount = 1;
            while(true){
                if(h == 1){
                 tekicount = tekicount *2;
                    break;
                }
                h = h/2;
                tekicount = tekicount*2;
            }

            total = tekicount - 1 ;

            System.out.println(total);
        }
	}
	
}


Compiler output:
Main.java:18: error: cannot find symbol
            total = tekicount - 1 ;
            ^
  symbol:   variable total
  location: class Main
Main.java:20: error: cannot find symbol
            System.out.println(total);
                               ^
  symbol:   variable total
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
int main(void){
    long long H,N;
    cin >> H >> N;
    vector<long long> ab(2*N);
    for (long long& v : ab)
	{
		cin >> v;
	}
  vector<long long> c(N);
  for (int i=0;i<N;i=i+2){
    c[i] = (float)ab[i] / ab[i+1];
  }
  sort(c.begin(),c.end());
 　long long sab[N][2];
  for (int i=0;i<N;i=i+2){
    for(int j = 0;j<N;j++){
      if(c[j] == (float)ab[i] / ab[i+1]){
        sab[j][0] = ab[i];
        sab[j][1] = ab[i+1];
      }
    }
  }
  
  long long sum = 0;
  while(H>=0){
    for (int i= 0;i<N;i++){
      if(H>=sub[i][0]){
        H -= sub[i][0];
        sum += 1;
        break;}
    }
   }
 }
 
cout << sum;
  
   
   return 0; 
}

Compiler output:
a.cc:17:2: error: extended character 　 is not valid in an identifier
   17 |  　long long sab[N][2];
      |  ^
a.cc: In function 'int main()':
a.cc:17:2: error: '\U00003000long' was not declared in this scope; did you mean 'ulong'?
   17 |  　long long sab[N][2];
      |  ^~~~~~
      |  ulong
a.cc:21:9: error: 'sab' was not declared in this scope; did you mean 'ab'?
   21 |         sab[j][0] = ab[i];
      |         ^~~
      |         ab
a.cc:30:13: error: 'sub' was not declared in this scope; did you mean 'sum'?
   30 |       if(H>=sub[i][0]){
      |             ^~~
      |             sum
a.cc: At global scope:
a.cc:38:1: error: 'cout' does not name a type
   38 | cout << sum;
      | ^~~~
a.cc:41:4: error: expected unqualified-id before 'return'
   41 |    return 0;
      |    ^~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

long long rec(long long N) {
    if (N == 1) return 1;
    return rec(N/2) * 2 + 1;
}

int main() {
    long long N;
    cin >> N;
    cout << solve(N) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'solve' was not declared in this scope
   12 |     cout << solve(N) << endl;
      |             ^~~~~
Language: Java

import java.util.*;
public class Main{
  
  static long findAns(long n,long ans,int count){
    if(n>1){
      ans+=Math.pow(2,count);
      ++count;
      findAns(n/2,ans,count);
    }
    else{
      ans+=Math.pow(2,count);
      return ans;
    }
  }
  
  public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    long n=sc.nextLong();
    long ans=0;
   	System.out.println(findAns(n,ans,0));
  }
}


Compiler output:
Main.java:14: error: missing return statement
  }
  ^
1 error