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

#include <stdio.h>
#include <iostream>

int main(void){
	int val[3];
	scanf("%d",&val[0]);
	scanf("%d",&val[1]);
	scanf("%d",&val[2]);
	std::sort(val, val+3);
	int calc = val[0] * val[1] / 2;
	printf("%d¥n",calc);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
    9 |         std::sort(val, val+3);
      |              ^~~~
      |              qsort
Language: C

#include <stdio.h>
int main(){
  int a;
  int b;
  scanf("%d,%d",&a,&b);
  printf(a * b / 2 \n);
}

Compiler output:
main.c: In function 'main':
main.c:6:20: error: stray '\' in program
    6 |   printf(a * b / 2 \n);
      |                    ^
main.c:6:19: error: expected ')' before 'n'
    6 |   printf(a * b / 2 \n);
      |         ~         ^ ~
      |                   )
main.c:6:16: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    6 |   printf(a * b / 2 \n);
      |          ~~~~~~^~~
      |                |
      |                int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <stdio.h>
#include <iostream>

int main(void){
	int val[3];
	scanf("%d",&val[0]);
	scanf("%d",&val[1]);
	scanf("%d",&val[2]);
	std::sort(val, val+3);
	int calc = val[0] * val[1] / 2;
	printf("%d/n",calc);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
    9 |         std::sort(val, val+3);
      |              ^~~~
      |              qsort
Language: Java

import java.util.Scanner;
 
public class kuso {
   
  public static void main(String args[]) {
     
      Scanner scan = new Scanner(System.in);

      float width = scan.nextFloat();
      float height = scan.nextFloat();
      float naname = scan.nextFloat();

      scan.close();
 
      // 面積
      float area = width * height / 2;
 
      // 答えを表示する
      System.out.println(area);
  }
}


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

#include <stdio.h>
#include <iostream>

int main(){
  int val[3];
  scanf("%d",&val[0]);
  scanf("%d",&val[1]);
  scanf("%d",&val[2]);
  std::sort(val, val+3);
  int calc = val[0] * val[1] / 2;
  printf("%d\n",calc);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
    9 |   std::sort(val, val+3);
      |        ^~~~
      |        qsort
Language: Java

import java.util.Scanner;
 
public class Test {
   
  public static void main(String args[]) {
     
      Scanner scan = new Scanner(System.in);

      float width = scan.nextFloat();
      float height = scan.nextFloat();
      float naname = scan.nextFloat();

      scan.close();
 
      // 面積
      float area = width * height / 2;
 
      // 答えを表示する
      System.out.println(area);
  }
}

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

#include <stdio.h>
#include <iostream>

int main(){
	int val[3];
	scanf("%d",&val[0]);
	scanf("%d",&val[1]);
	scanf("%d",&val[2]);
	std::sort(val, val+3);
	int calc = val[0] * val[1] / 2;
	printf("%d/n",calc);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
    9 |         std::sort(val, val+3);
      |              ^~~~
      |              qsort
Language: C++

#include <iostream>

int main () {
  
  int a, b, c;
  cin >> a >> b >> c;
  double s = 0.5 * (a + b + c);
  return pow(s * (s - a) * (s - b) * (s - c), 0.5);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a >> b >> c;
      |   ^~~
      |   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:10: error: 'pow' was not declared in this scope
    8 |   return pow(s * (s - a) * (s - b) * (s - c), 0.5);
      |          ^~~
Language: Java

import java.io.*;

class Main {
    public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String stra = br.readLine();
       		String strb = br.readLine();
      		String strc = br.readLine();
      
      int menseki = (stra + strb)/2;
      
      System.out.println(menseki);
    }
}


Compiler output:
Main.java:10: error: bad operand types for binary operator '/'
      int menseki = (stra + strb)/2;
                                 ^
  first type:  String
  second type: int
1 error
Language: C++

#include <stdio.h>
#include <iostream>

int main(){
  int val[3];
  scanf("%d",&val[0]);
  scanf("%d",&val[1]);
  scanf("%d",&val[2]);
  std::sort(val, val+3);
  int calc = val[0] * val[1] / 2;
  printf("%d/n",calc);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
    9 |   std::sort(val, val+3);
      |        ^~~~
      |        qsort
Language: Java

import java.io.*;

class Main {
    public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String stra = br.readLine();
       		String strb = br.readLine();
      		String strc = br.readLine();
      
      int menseki = (stra + strb)/2
      
      System.out.println(menseki);
    }
}


Compiler output:
Main.java:10: error: ';' expected
      int menseki = (stra + strb)/2
                                   ^
1 error
Language: Java

import java.io.*;

class Main {
    public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int stra = br.readLine();
       		int strb = br.readLine();
      		int strc = br.readLine();
      
      System.out.println((stra + strb)/2);
    }
}


Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
			int stra = br.readLine();
			                      ^
Main.java:7: error: incompatible types: String cannot be converted to int
       		int strb = br.readLine();
       		                      ^
Main.java:8: error: incompatible types: String cannot be converted to int
      		int strc = br.readLine();
      		                      ^
3 errors
Language: C++

#include <iostream>

using namespace std;

int main() {
int a,b,c;
  cin >> a;
  cin >> b;
  cin >> c;
  
cout << a*b/2 << endl;
  return0;
  
}

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

#include <iostream>
#include <algorithm>
using namespace std;
 
int main() {
  int a[3],ans = 1;;
  cin >> a[0] >> a[1] >> a[2];
  for(int i = 0;i < 3;i++){
	if(a[i] != max(a[0],a[1],a[2])){
    	ans *= a[i];
    }
  }
  cout << ans/2 << endl;
  return(0);
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:16:   required from here
    9 |         if(a[i] != max(a[0],a[1],a[2])){
      |                    ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#define int long long
#define ggr getchar();getchar();return 0;
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
int a[3];
signed main() {
	rep(i, n)cin >> a[i];
	sort(a, a + 3);
	cout << a[0] * a[1] / 2 << endl;
	ggr
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'n' was not declared in this scope
   14 |         rep(i, n)cin >> a[i];
      |                ^
a.cc:10:31: note: in definition of macro 'rep'
   10 | #define rep(i,n)for(int i=0;i<n;i++)
      |                               ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int a[3],ans = 1;;
  cin >> a[0] >> a[1] >> a[2];
  for(int i = 0;i < 3;i++){
	if(a[i] != max(a[0],a[1],a[2])){
    	ans *= a[i];
    }
  }
  cout << ans/2 << endl;
  return(0);
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:16:   required from here
    8 |         if(a[i] != max(a[0],a[1],a[2])){
      |                    ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: Java

import java.io.*;
class Sample{
    public static void main(String args[])throws IOException{
    	  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
      			teihen = Integer.parseInt(br.readLine());
     			takasa = Integer.parseInt(br.readLine());
      			naname = Integer.parseInt(br.readLine());
      
       System.out.println((teihen*takasa)/2);
    }
}


Compiler output:
Main.java:5: error: cannot find symbol
      			teihen = Integer.parseInt(br.readLine());
      			^
  symbol:   variable teihen
  location: class Sample
Main.java:6: error: cannot find symbol
     			takasa = Integer.parseInt(br.readLine());
     			^
  symbol:   variable takasa
  location: class Sample
Main.java:7: error: cannot find symbol
      			naname = Integer.parseInt(br.readLine());
      			^
  symbol:   variable naname
  location: class Sample
Main.java:9: error: cannot find symbol
       System.out.println((teihen*takasa)/2);
                           ^
  symbol:   variable teihen
  location: class Sample
Main.java:9: error: cannot find symbol
       System.out.println((teihen*takasa)/2);
                                  ^
  symbol:   variable takasa
  location: class Sample
5 errors
Language: C

#include<stdio.h>
int main(void){
    int AB,BC,CA;
    scanf_s(%d %d %d,&AB,&BC,&CA);
    if(CA*CA==AB*AB+BC*BC){
        printf("%d\n",AB*BC/2);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:5: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |     scanf_s(%d %d %d,&AB,&BC,&CA);
      |     ^~~~~~~
      |     scanf
main.c:4:13: error: expected expression before '%' token
    4 |     scanf_s(%d %d %d,&AB,&BC,&CA);
      |             ^
Language: C++

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <string>
typedef long long ll;
using namespace std;

int main()
{
    ll square;
    while(~scanf("%lld%lld%lld",&x,&y,&z))
    {
        printf("%lld\n",(x*y)/2);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: 'x' was not declared in this scope
   12 |     while(~scanf("%lld%lld%lld",&x,&y,&z))
      |                                  ^
a.cc:12:37: error: 'y' was not declared in this scope
   12 |     while(~scanf("%lld%lld%lld",&x,&y,&z))
      |                                     ^
a.cc:12:40: error: 'z' was not declared in this scope
   12 |     while(~scanf("%lld%lld%lld",&x,&y,&z))
      |                                        ^
Language: Java

import java.io.*;

class Main {
    public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String stra = br.readLine();
       		String strb = br.readLine();
      		String strc = br.readLine();
      
      System.out.println((stra + strb)/2);
    }
}

Compiler output:
Main.java:10: error: bad operand types for binary operator '/'
      System.out.println((stra + strb)/2);
                                      ^
  first type:  String
  second type: int
1 error
Language: C++

#include<iostrean>

int main () {
    int ab,bc,ca;
    std::cin >> ab >> bc >> ca ;
    std::cout << ab * bc /2 << std::endl;
    return 0;
}


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

#include<stdio.h>
int main(void){
    int AB,BC,CA;
    scanf(%d %d %d,&AB,&BC,&CA);
    if(CA*CA==AB*AB+BC*BC){
        printf("%d\n",AB*BC/2);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected expression before '%' token
    4 |     scanf(%d %d %d,&AB,&BC,&CA);
      |           ^
Language: C++

#include<stdio.h>
int main(void){
    int AB,BC,CA;
    scanf(%d %d %d,&AB,&BC,&CA);
    if(CA*CA==AB*AB+BC*BC){
        printf("%d\n",AB*BC/2);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: expected primary-expression before '%' token
    4 |     scanf(%d %d %d,&AB,&BC,&CA);
      |           ^
a.cc:4:12: error: 'd' was not declared in this scope
    4 |     scanf(%d %d %d,&AB,&BC,&CA);
      |            ^
Language: C++

//ios::sync_with_stdio(false);
//yang@(^_^)
#include <windows.h>
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	if(a>b)	swap(a,b);
	if(a>c) swap(a,c);
	if(b>c) swap(b,c);
	int ans=(a*b)/2;
	cout<<ans;
	return 0;
}


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

#include<stdio.h>
int main(void){
    int AB,BC,CA;
    scanf(%d %d %d,&AB,&BC,&CA);
    printf("%d\n",AB*BC/2);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: expected primary-expression before '%' token
    4 |     scanf(%d %d %d,&AB,&BC,&CA);
      |           ^
a.cc:4:12: error: 'd' was not declared in this scope
    4 |     scanf(%d %d %d,&AB,&BC,&CA);
      |            ^
Language: C++


def main():
    n = [int(i) for i in input().split()]
    a2, b2, c2 = [i**2 for i in n]
    a, b, c = n
    # print(a,b,c)
    # print(a2,b2,c2)
    ans = 0
    if a2+b2 == c2:
        ans = a * b
    elif b2+c2 == a2:
        ans = b * c
    elif a2+c2 == b2:
        ans == a * c
    print(int(ans/2))

main()


Compiler output:
a.cc:6:7: error: invalid preprocessing directive #print
    6 |     # print(a,b,c)
      |       ^~~~~
a.cc:7:7: error: invalid preprocessing directive #print
    7 |     # print(a2,b2,c2)
      |       ^~~~~
a.cc:2:1: error: 'def' does not name a type
    2 | def main():
      | ^~~
Language: C

#include<stdio.h>
int main(void){
    int AB,BC,CA;
    scanf(%d %d %d,&AB,&BC,&CA);
    printf("%d\n",AB*BC/2);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected expression before '%' token
    4 |     scanf(%d %d %d,&AB,&BC,&CA);
      |           ^
Language: C

#include<stdio.h>
int main(void)
{
int a,b,c,x;
scanf_s("%d %d %d",&a,&b,&c);
x=(a*b)/2;
printf("%d\n",x);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 | scanf_s("%d %d %d",&a,&b,&c);
      | ^~~~~~~
      | scanf
Language: Java

import java.util.*;
class Main{
  public static void main{
    Scanner sc= new Scanner(System.in);
    int a=sc.nextInt();
    int b=sc.nextInt();
    int c=sc.nextInt();
    int area=(a*b)/2;
    System.out.println(area);
  }
}

Compiler output:
Main.java:3: error: '(' expected
  public static void main{
                         ^
1 error
Language: C++

#include<iostream>
#include <string>
#include<algorithm>
#include <set>
#include <cmath>
using namespace std;

int main(void){
	ios::sync_with_stdio(false);
	int a[3] l1, l2, l3;
	cin >> a[0]>> a[1] >> a[2];
	sort(a, a + 3);
	cout << a[0] * a[1] / 2;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected initializer before 'l1'
   10 |         int a[3] l1, l2, l3;
      |                  ^~
a.cc:11:16: error: 'a' was not declared in this scope
   11 |         cin >> a[0]>> a[1] >> a[2];
      |                ^
Language: C

#include<stdio.h>
int main(void)
{
int a,b,c,x;
scanf_s("%d%d%d",&a,&b,&c);
x=(a*b)/2;
printf("%d\n",x);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 | scanf_s("%d%d%d",&a,&b,&c);
      | ^~~~~~~
      | scanf
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int a,b,c;
  cin a>>b>>c;
  if(a>=b and a>=c){
    cout<<b*c/2<<endl;
  }
  else if(b>c and b>a){
    cout<<a*c/2<<endl;
  }
  else{
    cout<<a*b/2<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
    6 |   cin a>>b>>c;
      |      ^~
      |      ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a, b, c;
  cin >> a >> b >> c;
  int ans = 0;
  ans = 1 / 2 * a * b;
  cout << ans\n;
  return 0;
}

Compiler output:
a.cc:8:14: error: stray '\' in program
    8 |   cout << ans\n;
      |              ^
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'n'
    8 |   cout << ans\n;
      |              ^~
      |              ;
Language: Java

public class Main {
 public static void main(String...args) {
  final java.util.Scannner sc = new java.util.Scanner(System.in);
   final int AB = sc.nextInt();
   final int BC = sc.nextInt();
   System.out.println(AB * BC);
 }
}

Compiler output:
Main.java:3: error: cannot find symbol
  final java.util.Scannner sc = new java.util.Scanner(System.in);
                 ^
  symbol:   class Scannner
  location: package java.util
1 error
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int a,b,c;
  cin a>>b>>c;
  if(a>=b and a>=c){
    cout<<b*c/2<<endl;
  }
  else if(b>c and b>a){
    cout<<a*c/2<<endl;
  }
  else
    cout<<a*b/2<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
    6 |   cin a>>b>>c;
      |      ^~
      |      ;
Language: C

#include <iostream>
#include <set>
#include <vector>
#include <string>
#include <algorithm>
#include <iterator>
#include <cmath>

using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
#define repi(i, n) for(auto i = (n).begin(); i != (n).end(); i++)
#define in_arr(type, a, n) copy_n(istream_iterator<type>(cin), n, (a).begin());

int main(){
    double a, b, c,s ;
    cin >> a >> b >> c;
    s = (a + b + c) / 2;
    cout << (int)sqrt(s * (s - a) * (s - b) * (s- c)) << endl;
    return 0;
}



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

int main()
{
	int ab, bc, ca;
	scanf("%d %d %d", &ab, &bc, &ca);
	int s = ab*bc/2;

	printf("%d", s);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
    4 |         scanf("%d %d %d", &ab, &bc, &ca);
      |         ^~~~~
a.cc:7:9: error: 'printf' was not declared in this scope
    7 |         printf("%d", s);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int ab , bc , ca , ret ; cin >> ab >> bc >>ca ;
  ret = ab * bc /2;
  cout << ret << endl;

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

#include <iostream>

int main() {
    int a[3];
    int r;

    std::cin >> a[0] >> a[1] >> a[2];
    std::sort(a, a + 3);

    r = a[0] * a[1] / 2;
    std::cout << r << std::endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
    8 |     std::sort(a, a + 3);
      |          ^~~~
      |          qsort
Language: C++

#include <iostream>
using namespace std;

int main() {
    int AB, BC, CA;
    cin >> AB >> BC >> CA;
    int c = 0.5 * AB * BC
    cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'cout'
    8 |     cout << c << endl;
      |     ^~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int a,b,c;
  cin a>>b>>c;
  if(a>=b and a>=c){
    cout<<b*c/2<<endl;
  }
  else if(b>c and b>a){
    cout<<a*c/2<<endl;
  }
  else
    cout<<a*b/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
    6 |   cin a>>b>>c;
      |      ^~
      |      ;
Language: C++

#include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define INF LLONG_MAX/3
#define eps LDBL_EPSILON
#define moder 100000
#define pie 3.141592653589793238462643383279
#define P std::pair<int,int>
#define prique priority_queue
using namespace std;
signed main(){
	double a,b,c;
	cin>>a>>b>>c;
	double d=(a+b+c)/2;
	cout<<(int)sqrt(d*(d-a)*(d-b)*(d-c)))<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:45: error: expected ';' before ')' token
   16 |         cout<<(int)sqrt(d*(d-a)*(d-b)*(d-c)))<<endl;
      |                                             ^
      |                                             ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {

    cin >> a >> b >> c;

    cout << (a*b/2) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'a' was not declared in this scope
    7 |     cin >> a >> b >> c;
      |            ^
a.cc:7:17: error: 'b' was not declared in this scope
    7 |     cin >> a >> b >> c;
      |                 ^
a.cc:7:22: error: 'c' was not declared in this scope
    7 |     cin >> a >> b >> c;
      |                      ^
Language: Java

import  java.util.*;

class Main{
  public staitc void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int ab = sc.nextInt();
    int bc = sc.nextInt();
    int ca = sc.nextInt();
    System.out.print(ab*bc);
  }
}

Compiler output:
Main.java:4: error: <identifier> expected
  public staitc void main(String args[]){
               ^
1 error
Language: Java

class Main{
  public staitc void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int ab = sc.nextInt();
    int bc = sc.nextInt();
    int ca = sc.nextInt();
    System.out.print(ab*bc);
  }
}

Compiler output:
Main.java:2: error: <identifier> expected
  public staitc void main(String args[]){
               ^
1 error
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  cout << a*b/2 << endl:
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before ':' token
    7 |   cout << a*b/2 << endl:
      |                        ^
      |                        ;
Language: C++

#define<stdio.h>
int main(){
	int a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	c=a*b;
	printf("%d",c);
}

Compiler output:
a.cc:1:8: error: macro names must be identifiers
    1 | #define<stdio.h>
      |        ^
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
    4 |         scanf("%d %d %d",&a,&b,&c);
      |         ^~~~~
a.cc:6:9: error: 'printf' was not declared in this scope
    6 |         printf("%d",c);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define<stdio.h>
Language: C++

#include<bits/stdc++.h>

#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define Yes(hoge) cout<<((hoge)?"Yes":"No")<<endl;
#define YES(hoge) cout<<((hoge)?"YES":"NO")<<endl;
using namespace std;
struct Grid{int x,y,t;};
struct Edge{int to,cost;};
struct Graph{vector<vector<Edge>>E;int V;
  const ll Inf = llINF;const int MAX_V=1010;vector<ll>d;
  Graph(int n):E(n){d.resize(MAX_V);E.resize(n);V=n;}
  void init(){for(int i=0;i<MAX_V;i++)d[i]=Inf;}
  void add_edge(int from,int to,int cost){E[from-1].pb({to-1,cost});}
};
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a,b,c,d,e;
  string s,ss;
  cin>>a>>b>>c;
  cout<<min(min(a*b/2,a*c/2),b*c/2)<<endl;
  return 0;
}
#include<bits/stdc++.h>

#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define Yes(hoge) cout<<((hoge)?"Yes":"No")<<endl;
#define YES(hoge) cout<<((hoge)?"YES":"NO")<<endl;
using namespace std;
struct Grid{int x,y,t;};
struct Edge{int to,cost;};
struct Graph{vector<vector<Edge>>E;int V;
  const ll Inf = llINF;const int MAX_V=1010;vector<ll>d;
  Graph(int n):E(n){d.resize(MAX_V);E.resize(n);V=n;}
  void init(){for(int i=0;i<MAX_V;i++)d[i]=Inf;}
  void add_edge(int from,int to,int cost){E[from-1].pb({to-1,cost});}
};
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a,b,c,d,e;
  string s,ss;
  cin>>a>>b>>c;
  cout<<min(min(a*b/2,a*c/2),b*c/2)<<endl;
  return 0;
}


Compiler output:
a.cc:46:8: error: redefinition of 'struct Grid'
   46 | struct Grid{int x,y,t;};
      |        ^~~~
a.cc:15:8: note: previous definition of 'struct Grid'
   15 | struct Grid{int x,y,t;};
      |        ^~~~
a.cc:47:8: error: redefinition of 'struct Edge'
   47 | struct Edge{int to,cost;};
      |        ^~~~
a.cc:16:8: note: previous definition of 'struct Edge'
   16 | struct Edge{int to,cost;};
      |        ^~~~
a.cc:48:8: error: redefinition of 'struct Graph'
   48 | struct Graph{vector<vector<Edge>>E;int V;
      |        ^~~~~
a.cc:17:8: note: previous definition of 'struct Graph'
   17 | struct Graph{vector<vector<Edge>>E;int V;
      |        ^~~~~
a.cc:54:5: error: redefinition of 'int main()'
   54 | int main(){
      |     ^~~~
a.cc:23:5: note: 'int main()' previously defined here
   23 | int main(){
      |     ^~~~
Language: Java

public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int ans=0;
		int a=scan.nextInt();
		int b=scan.nextInt();
		int c=scan.nextInt();
		System.out.println(a*b/2);
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main()
{
  int s;
  cin >> s;
  set<int> st;
  st.insert(s);
  
  for(int i=0; i<1000000; i++)
  {
    if(s % 2 == 0)
      s /= 2;
    else
      s = 3 * s + 1;
    
    if(st.find(s))
    {
      cout << i+1 << endl;
      return 0;
    }
    else
      st.inset(s);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: could not convert 'st.std::set<int>::find(s)' from 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'bool'
   19 |     if(st.find(s))
      |        ~~~~~~~^~~
      |               |
      |               std::set<int>::iterator {aka std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator}
a.cc:25:10: error: 'class std::set<int>' has no member named 'inset'; did you mean 'insert'?
   25 |       st.inset(s);
      |          ^~~~~
      |          insert
Language: C++

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

int main()
{
  int s;
  cin >> s;
  set<int> st;
  st.insert(s);
  
  for(int i=0; i<1000000; i++)
  {
    if(s % 2 == 0)
      s /= 2;
    else
      s = 3 * s + 1;
    
    if(st.find(s))
    {
      cout << i+1 << endl;
      return 0;
    }
    else
      st.inset(s);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'set' was not declared in this scope
   10 |   set<int> st;
      |   ^~~
a.cc:4:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    3 | #include <algorithm>
  +++ |+#include <set>
    4 | using namespace std;
a.cc:10:7: error: expected primary-expression before 'int'
   10 |   set<int> st;
      |       ^~~
a.cc:11:3: error: 'st' was not declared in this scope; did you mean 's'?
   11 |   st.insert(s);
      |   ^~
      |   s
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int n;
  cin >> n;
  
  int c[10000000];
  memset(c,0,sizeof(c));
  ++c[n]
  
  int res = 1;
  while(true){
    ++res;
    if(n % 2 == 0){
      n /= 2;
    }else{
      n *= 3;
      ++n;
    }
    
    if(c[n] == 0){
      ++c[n];
    }else{
      break;
    }
  }
  
  cout << res <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ';' before 'int'
   10 |   ++c[n]
      |         ^
      |         ;
   11 | 
   12 |   int res = 1;
      |   ~~~    
a.cc:14:7: error: 'res' was not declared in this scope
   14 |     ++res;
      |       ^~~
a.cc:29:11: error: 'res' was not declared in this scope
   29 |   cout << res <<endl;
      |           ^~~
Language: C++

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

int main(){
  int S;cin>>S;
  set<int> A;
  A.insert(S);
  int X=S;
  int M=2;
  while(true){
    if(X%2==1) X=3X+1;
    else X/=2;
    if(A.count(X)) break;
    else{
      A.insert(X);
      M++;
    }
  }
  cout<<M<<endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: unable to find numeric literal operator 'operator""X'
   11 |     if(X%2==1) X=3X+1;
      |                  ^~
Language: C++

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

int main(){
  int S;cin>>S;
  set<int> A;
  A.insert(S);
  int X=S;
  int M=2;
  while(true){
    if(X%2==1) X=3X+1;
    else X/=2;
    if(A.count(X)) break;
    else{
      A.insert(X);
      M++
    }
  }
  cout<<M<<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: unable to find numeric literal operator 'operator""X'
   11 |     if(X%2==1) X=3X+1;
      |                  ^~
a.cc:16:10: error: expected ';' before '}' token
   16 |       M++
      |          ^
      |          ;
   17 |     }
      |     ~
Language: C++

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

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

    vector<int> a(1,s);
    for (int i = 1; i <= 1000000; i++) {
        if (a[i-1]%2 == 0)
            a.push_back(v[i-1]/2);
        else
            a.push_back(3*v[i-1]-1);

        for (int j = 0; j < i; j++) {
            if (a[i] == a[j]) {
                cout << a[i] << endl;
                return 0;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'v' was not declared in this scope
   11 |             a.push_back(v[i-1]/2);
      |                         ^
a.cc:13:27: error: 'v' was not declared in this scope
   13 |             a.push_back(3*v[i-1]-1);
      |                           ^
Language: C++

s=int(input())

l=[0]*1000001
check=[0]*5000000

l[1]=s
ans=0

for i in range(2,1000000):
    if l[i-1]%2==0:
        l[i]=int(l[i-1]/2)
        if check[l[i]]==0:
            check[l[i]]+=1
        else:
            ans=i
            break
    else:
        l[i]=3*l[i-1]+1
        if check[l[i]] == 0:
            check[l[i]] += 1
        else:
            ans = i
            break

print(ans)

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

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

#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384


int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} 
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}    //最大公約数
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}     //最小公倍数
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション
int nHr(int a,int b){return nCr(a+b-1,b);}       // 重複組み合わせ
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}  //階乗
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗
int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;}   //数字の各位の和
int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;}  // b進数の各位の和？
int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和

//以下long long ver
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;}
long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

//double
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}


typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
#define forr(i,a,b) ; for(int i=(a); i<(b); i++)
#define clean(arr,val) memset(arr,val,sizeof(arr))
#define forn(i,n) forr(i,0,n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

 
/*CODE START HERE*/
int main() {
  int s;
  cin >> s;
  int a_n = s;
  int n = 1;
  while (  ){
    if (  a_n != 1 || a_n != 2 ||a_n != 4){
      break ;
    }
    if ( a_n%2==1){
      a_n = 3*a_n+1;
    }else if ( a_n%2==0){
      a_n/=2;
    }
    n++;
  }
  cout << n+3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:64:12: error: expected primary-expression before ')' token
   64 |   while (  ){
      |            ^
Language: C++

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

#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384


int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} 
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}    //最大公約数
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}     //最小公倍数
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション
int nHr(int a,int b){return nCr(a+b-1,b);}       // 重複組み合わせ
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}  //階乗
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗
int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;}   //数字の各位の和
int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;}  // b進数の各位の和？
int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和

//以下long long ver
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;}
long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

//double
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}


typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
#define forr(i,a,b) ; for(int i=(a); i<(b); i++)
#define clean(arr,val) memset(arr,val,sizeof(arr))
#define forn(i,n) forr(i,0,n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

 
/*CODE START HERE*/
int main() {
  int s;
  cin >> s;
  int a_n = s;
  int n = 1;
  while ( a_n != 1 || a_n != 2 ||a_n != 4 ||){
    if ( a_n%2==1){
      a_n = 3*a_n+1;
    }else if ( a_n%2==0){
      a_n/=2;
    }
    n++;
  }
  cout << n+3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:64:45: error: expected primary-expression before ')' token
   64 |   while ( a_n != 1 || a_n != 2 ||a_n != 4 ||){
      |                                             ^
Language: C++

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

#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384


int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} 
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}    //最大公約数
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}     //最小公倍数
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション
int nHr(int a,int b){return nCr(a+b-1,b);}       // 重複組み合わせ
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}  //階乗
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗
int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;}   //数字の各位の和
int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;}  // b進数の各位の和？
int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和

//以下long long ver
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;}
long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

//double
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}


typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
#define forr(i,a,b) ; for(int i=(a); i<(b); i++)
#define clean(arr,val) memset(arr,val,sizeof(arr))
#define forn(i,n) forr(i,0,n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

 
/*CODE START HERE*/
int main() {
  int s;
  cin >> s;
  int a_n = s;
  int n = 1; 
  while ( a_n == 1){
    if ( a_n%2==1){
      a_n = 3*a_n+1;
    }else if ( a_n%==0){
      a_n/=2;
    }
    n++;
  }
  cout << n+1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:21: error: expected primary-expression before '=' token
   67 |     }else if ( a_n%==0){
      |                     ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  int res = 1;
  set<int> se;
  se.insert(N);
  while (true) {
    if (N % 2 == 0) N /= 2;
    else N = N*3 + 1;
    ++res;
    if (se.count(N)) break;
    se.insert(N);
  }
  cout << res << endl;
    

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

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

int main() {
  int s;
  cin >> s;
  vector<int64_t> a(1000000);
  a[0]=s;
  vector<int64_t> b(1000000);
  for (int64_t i=0; i<999999; i++) {
    b[i]=1000000;
    if (a[i]%2==0) {
      a[i+1]=a[i]/2;
    }
    else {
      a[i+1]=3*a[i]+1;
    }
  }
  for (int64_t j=0; j<1000000; j++) {
    if (a[j]==4) {
      b[j]=j;
    }
  sort(b.begin(),b.end());
  cout << b[0]+4 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int s = scn.nextInt();
		int a = sc.nextInt();
    	int count = 0;
    	int count2 = 0;
    	if(a == 1){
        	count = count + 1;
        }
    	if(a == 2){
        	count = count - 2;
        }
    	while(count2 < 2){
      		count = count + 1;
      		if(a == 4){
            	count2 = count + 1;
            }
			if(a%2==0){
            	a = a/2;
            }else{
             	a = a*3 + 1;
            }
   		 }
    
    	System.out.println(count);
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		int a = sc.nextInt();
		        ^
  symbol:   variable sc
  location: class Main
1 error
Language: C

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>

#define rep(i, n) for(int i=0; i<(n); ++i)
#define max  200001

//qsort(str, n, sizeof(int), up_comp);
int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;}
int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;}
int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );}
int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;}
int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);}

int main(void){
 
    int s;
    
    scanf("%d", &s);
    
    if (s==4||s==2||s==1) {
        printf("%d\n", i+3);
        return 0;
    }
    
    for (int i=2; i<=1000000; i++) {
        if (s%2==0) {
            s=s/2;
        } else {
            s=3*s+1;
        }
        
        if (s==4||s==2||s==1) {
            printf("%d\n", i+3);
            return 0;
        }
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:25:24: error: 'i' undeclared (first use in this function)
   25 |         printf("%d\n", i+3);
      |                        ^
main.c:25:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

import sys

s = int(input())
a = []
a.append(s)
i = 1
while True:
    n = 0
    if a[i-1] %2 ==0:
        n = a[i-1]/2
    else:
        n = a[i-1]*3 +1
    i +=1
    if n in a:
        print(i)
        sys.exit()
    a.append(n)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
const ll INF = 1LL << 60;

int main(){
    int s;
    cin >> s;
    int ans=1;
    vector<int> num;

    while(true){
        num.push_back(s);
        rep(i+1,num.size()){
            if(num[i]==s){
                cout << ans << endl;
                return 0;
            }
        }
        if(s%2==0){
            s /=2;
        }
        else if(s%2==1){
            s = 3*s+1;
        }
        ans ++;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: expected ';' before '+' token
   17 |         rep(i+1,num.size()){
      |              ^
a.cc:5:28: note: in definition of macro 'rep'
    5 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                            ^
a.cc:17:14: error: lvalue required as left operand of assignment
   17 |         rep(i+1,num.size()){
      |              ^~
a.cc:5:28: note: in definition of macro 'rep'
    5 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                            ^
a.cc:5:47: error: expected ')' before ';' token
    5 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                       ~                       ^
a.cc:17:9: note: in expansion of macro 'rep'
   17 |         rep(i+1,num.size()){
      |         ^~~
a.cc:17:13: error: 'i' was not declared in this scope
   17 |         rep(i+1,num.size()){
      |             ^
a.cc:5:49: note: in definition of macro 'rep'
    5 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                                 ^
a.cc:17:15: error: lvalue required as increment operand
   17 |         rep(i+1,num.size()){
      |               ^
a.cc:5:49: note: in definition of macro 'rep'
    5 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                                 ^
Language: C

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

typedef long long ll;

int max(int a, int b){
  if(a > b) return a;
  else return b;
}
int min(int a, int b){
  if(a < b) return a;
  else return b;
}

int sort(const void *a ,const void *b){
  return *(int*)a - *(int*)b;
}

int main(){

  int s;
  scanf("%d",&s);
  int m;
  int flag = 0;

  while(1){
    index ++;
    if(s % 2 == 0){
      s /= 2;
    }else if(s % 2 == 1) s = 3*s +1;
    if(s == 4 && flag == 1){
      printf("%d",index);
      return 0;
    }
    if(s == 4) flag = 1;
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:29:11: error: lvalue required as increment operand
   29 |     index ++;
      |           ^~