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

#include<iostream>

using namespace std;


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

   if(n >= 1 && n <= 999}{
              cout << "ABC";
   }else{
            cout << "ABD";
   }

  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: expected ')' before '}' token
   11 |    if(n >= 1 && n <= 999}{
      |      ~                  ^
      |                         )
a.cc:11:25: error: expected primary-expression before '}' token
a.cc: At global scope:
a.cc:11:26: error: expected unqualified-id before '{' token
   11 |    if(n >= 1 && n <= 999}{
      |                          ^
a.cc:13:5: error: expected unqualified-id before 'else'
   13 |    }else{
      |     ^~~~
a.cc:17:3: error: expected unqualified-id before 'return'
   17 |   return 0;
      |   ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

import java.util.*;

public class Main{

	public static int contains(int[] array,int a){
		int c=0;
		for(int i=0;i<array.length;i++){
			if(array[i]==a){
				c=1;
				break;
			}else{
				c=2;
			}
		}return c;
	}

	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		if(n>=1 && n<=999){
			System.out.println("ABC");
		}else{
			System.out.println("ABD");
		}
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int a;
    scanf("%d",&a);
    if(a>999)
        printf("ABD");
    else
        printf("ABC");
    return 0

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before '}' token
   11 |     return 0
      |             ^
      |             ;
   12 | 
   13 | }
      | ~
Language: C++

#include<iostream>

using namespace std;

int main()
{
 int n;
 cin >> n;
if(n<1000) cout<<"ABC"<< endl;
else cout<<"ABD"<< endl:
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected ';' before ':' token
   10 | else cout<<"ABD"<< endl:
      |                        ^
      |                        ;
Language: C++

#include<iostream>

using namespace std;

int main()
{
 int n;
 cin >> n;
if(n<1000) cout<<ABC<< endl;
else cout<<ABD<< endl:
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: 'ABC' was not declared in this scope
    9 | if(n<1000) cout<<ABC<< endl;
      |                  ^~~
a.cc:10:12: error: 'ABD' was not declared in this scope
   10 | else cout<<ABD<< endl:
      |            ^~~
Language: C++

#include<iostream>

using namespace std;

int main()
{
 int n;
 cin >> n;
if(n<1000)
cout<<ABC<< endl;
else
cout<<ABD<< endl:
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'ABC' was not declared in this scope
   10 | cout<<ABC<< endl;
      |       ^~~
a.cc:12:7: error: 'ABD' was not declared in this scope
   12 | cout<<ABD<< endl:
      |       ^~~
Language: C

#include <stdio.h>
int main (){
	int Z;
	scanf ("%d",&Z);
	if(Z=>999){
		printf("ABC");
	}
	else{
		printf("ABD");
	}
	
	return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:5:14: error: expected expression before '>' token
    5 |         if(Z=>999){
      |              ^
Language: C++

        #include<iostream>
        using namespace std;
        int main(){
          int N;
          
          cin>>N;
          if(N%999==0,N!=0){cout<<999}
          else(cout<<N%999);
          cout<<endl;
          
          return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:38: error: expected ';' before '}' token
    7 |           if(N%999==0,N!=0){cout<<999}
      |                                      ^
      |                                      ;
Language: C++

    #include<iostream>
    using namespace std;
    int main(){
      int N;
      
      cin>>N;
      if(N%999==0,N!=0){cout<<999};
      else(cout<<N%999);
      cout<<endl;
      
      return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:34: error: expected ';' before '}' token
    7 |       if(N%999==0,N!=0){cout<<999};
      |                                  ^
      |                                  ;
a.cc:8:7: error: 'else' without a previous 'if'
    8 |       else(cout<<N%999);
      |       ^~~~
Language: C++

    #include<iostream>
    using namespace std;
    int main(){
      int N;
      
      cin>>N;
      if(N%999=0,N!=0){cout<<999;}
      else(cout<<N%999;)
      cout<<endl;
      
      return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: lvalue required as left operand of assignment
    7 |       if(N%999=0,N!=0){cout<<999;}
      |          ~^~~~
a.cc:8:23: error: expected ')' before ';' token
    8 |       else(cout<<N%999;)
      |           ~           ^
      |                       )
a.cc:8:24: error: expected primary-expression before ')' token
    8 |       else(cout<<N%999;)
      |                        ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  
  cin>>N;
  if(N&999=0,N!=0){cout<<999;}
  else(cout<<N%999;)
  cout<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: lvalue required as left operand of assignment
    7 |   if(N&999=0,N!=0){cout<<999;}
      |      ~^~~~
a.cc:8:19: error: expected ')' before ';' token
    8 |   else(cout<<N%999;)
      |       ~           ^
      |                   )
a.cc:8:20: error: expected primary-expression before ')' token
    8 |   else(cout<<N%999;)
      |                    ^
Language: C

#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
if(n>0&&n<=999)
printf("ABC\n);
else if(n>999&&n<=1998)
printf("ABD\n);
return 0;}

Compiler output:
main.c: In function 'main':
main.c:7:8: warning: missing terminating " character
    7 | printf("ABC\n);
      |        ^
main.c:7:8: error: missing terminating " character
    7 | printf("ABC\n);
      |        ^~~~~~~~
main.c:8:1: error: expected expression before 'else'
    8 | else if(n>999&&n<=1998)
      | ^~~~
main.c:9:8: warning: missing terminating " character
    9 | printf("ABD\n);
      |        ^
main.c:9:8: error: missing terminating " character
    9 | printf("ABD\n);
      |        ^~~~~~~~
main.c:10:1: error: expected declaration or statement at end of input
   10 | return 0;}
      | ^~~~~~
Language: C++

a=gets.to_i
if a>=1000
puts 'ABD%03d' % (1+(a%1000))
else
puts 'ABC%03d' % a
end

Compiler output:
a.cc:3:6: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    3 | puts 'ABD%03d' % (1+(a%1000))
      |      ^~~~~~~~~
a.cc:5:6: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    5 | puts 'ABC%03d' % a
      |      ^~~~~~~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a=gets.to_i
      | ^
Language: C++

 #include <iostream>
using namespace std;
int main(){
  int n;
  cin >> n;
  cout << n/1000 ? "ABC" : "ABD" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:34: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |   cout << n/1000 ? "ABC" : "ABD" << endl;
      |                            ~~~~~~^~~~~~~
Language: C

    #include <iostream>
    using namespace std;
    #include <cstdio>
        int main()
        {
         int n;
        scanf("%d",&n);
        if(n<1000)
        printf("ABC");
        else
        printf("ABD");
        return 0;
     
        }

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

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

    int main()
    {
     int n;
    scanf("%d",&n);
    if(n<1000)
    printf("ABC");
    else
    printf("ABD");
    return 0;

    }

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


import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by oka on 2018/06/10.
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int[] temp = {1, 6, 9, 36, 81, 216, 729, 1296, 6561, 7776, 46656, 59049};
        List<Integer> list = new ArrayList<Integer>();
        ConcurrentHashMap map = new ConcurrentHashMap();
        for (int i = 0; temp[i] <= n; i++) {
            if (n == temp[i]) {
                System.out.println(1);
                return;
            }
            list.add(temp[i]);
            map.put(temp[i], true);
        }

        int retCounter = 1;
        while (true) {
            retCounter++;
            synchronized (map) {
                List<Integer> tmp = new ArrayList<Integer>();
                for (Iterator<Integer> i = map.keySet().iterator(); i.hasNext(); ) {
                    tmp.add(i.next());
                }
            }
            synchronized (map) {
                for (int key: tmp) {
                    synchronized (map) {
                        map.remove(key);
                    }
                    for (int j = 0; j < list.size(); j++) {
                        int newKey = key + list.get(j);
                        if (newKey == n) {
                            System.out.println(retCounter);
                            return;
                        }
                        synchronized (map) {
                            map.put(newKey, true);
                        }
                    }
                }
            }
        }
    }
}


Compiler output:
Main.java:35: error: cannot find symbol
                for (int key: tmp) {
                              ^
  symbol:   variable tmp
  location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a;
    cin>>a;
    
    cout << ( a < 1000 ? "ABC" : "ABD")
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: expected ';' before '}' token
    8 |     cout << ( a < 1000 ? "ABC" : "ABD")
      |                                        ^
      |                                        ;
    9 | }
      | ~
Language: C++

#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<stack>
#include<queue>

typedef long long i64;

using namespace std;

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

    if(N<=999) cout<<"ABC\n";
    else cout<<"ABD\n";
    


}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: expected ';' before 'if'
   15 |     cin>>N
      |           ^
      |           ;
   16 | 
   17 |     if(N<=999) cout<<"ABC\n";
      |     ~~     
a.cc:18:5: error: 'else' without a previous 'if'
   18 |     else cout<<"ABD\n";
      |     ^~~~
Language: C

#include <cstdio>
#include <iostream>

using namespace std;
int main(){
int n;
cin >> n;
int data;
data = n;
int d[10];
int m = 1;
for (int i = 0; i<10 ;i++){

	d[i] = ( n % (9*m) )/m;
	n = n - n % (9*m);
	m = m*9;
}
n = data;
int j[10];
int k[10];
int pans;
int ans = 100000;
for (j[5] = 0; j[5] <= d[5]; j[5]++){
	for (j[4] = 0; j[4] <= d[4]; j[4]++){
		for (j[3] = 0; j[3] <= d[3]; j[3]++){
			for (j[2] = 0; j[2] <= d[2]; j[2]++){
				for (j[1] = 0; j[1] <= d[1]; j[1]++){
					
						n = n - (j[5] * 59049 + j[4] * 6561 + j[3] * 729 + j[2] * 81 + j[1] * 9);
					
						// 6-adic expansion
						int m = 1;
                                                int pans = 0;
						for (int i = 0; i<10 ;i++){
						k[i] = ( n % (6*m) )/m;
						n = n - n % (6*m);
						m = m*6;
						pans = pans + k[i];
						}
						// 6-adic expansion fin
						
						pans = pans + j[1] + j[2] + j[3] + j[4] + j[5];
					n = data;
					if(pans <= ans){
						ans = pans;
					} else {}
				}
			}
		}
	}
}

cout << ans;
return 0;

}

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

#include"stdafx.h"
#include<iostream>

using namespace std;


int main()
{
	int n;

	cin >> n;
	if (n<1000) {
		cout << "ABC\n";
	}
	else {
		cout << "ABD\n";
	}

    return 0;
}

Compiler output:
a.cc:1:9: fatal error: stdafx.h: No such file or directory
    1 | #include"stdafx.h"
      |         ^~~~~~~~~~
compilation terminated.
Language: Java

import  java.util.*;
class Main{

public static void  main(String[]  args){

 long sum = 1;int[] arr = new int[1000];
for(int i = 1;i <= 999 ;i++)
arr[i] = i+arr[i-1];

Scanner  s = new Scanner(System.in);
int a = s.nextInt() , b = s.nextInt();

int diff1 = 0 , diff2 = 0;
for(int i = 1;i <= 999;i++){
if(arr[i] >= a){
diff1 = (arr[i] - a);
diff2 = (arr[i+1] - b);
if(diff1 == diff2)
break;
}
}
System.out.println(diff);
}
}

Compiler output:
Main.java:22: error: cannot find symbol
System.out.println(diff);
                   ^
  symbol:   variable diff
  location: class Main
1 error
Language: C

#include <stdio.h>
int main(void){

int N;

scanf(“%d”,&N);

if(N<=999)
  printf(“ABC¥n”);
else  printf(“ABD¥n");

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: stray '\342' in program
    6 | scanf(<U+201C>%d<U+201D>,&N);
      |       ^~~~~~~~
main.c:6:8: error: expected expression before '%' token
    6 | scanf(“%d”,&N);
      |        ^
main.c:6:10: error: stray '\342' in program
    6 | scanf(<U+201C>%d<U+201D>,&N);
      |                 ^~~~~~~~
main.c:9:10: error: stray '\342' in program
    9 |   printf(<U+201C>ABC<U+00A5>n<U+201D>);
      |          ^~~~~~~~
main.c:9:14: error: stray '\302' in program
    9 |   printf(<U+201C>ABC<U+00A5>n<U+201D>);
      |                     ^~~~~~~~
main.c:9:11: error: 'ABC' undeclared (first use in this function)
    9 |   printf(“ABC¥n”);
      |           ^~~
main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:14: error: expected ')' before 'n'
    9 |   printf(“ABC¥n”);
      |         ~    ^~
      |              )
main.c:9:16: error: stray '\342' in program
    9 |   printf(<U+201C>ABC<U+00A5>n<U+201D>);
      |                              ^~~~~~~~
main.c:10:14: error: stray '\342' in program
   10 | else  printf(<U+201C>ABD<U+00A5>n");
      |              ^~~~~~~~
main.c:10:18: error: stray '\302' in program
   10 | else  printf(<U+201C>ABD<U+00A5>n");
      |                         ^~~~~~~~
main.c:10:15: error: 'ABD' undeclared (first use in this function)
   10 | else  printf(“ABD¥n");
      |               ^~~
main.c:10:18: error: expected ')' before 'n'
   10 | else  printf(“ABD¥n");
      |             ~    ^~
      |                  )
main.c:10:20: warning: missing terminating " character
   10 | else  printf(“ABD¥n");
      |                    ^
main.c:10:20: error: missing terminating " character
   10 | else  printf(“ABD¥n");
      |                    ^~~
main.c:12:10: error: expected ';' before '}' token
   12 | return 0;
      |          ^
      |          ;
   13 | }
      | ~
Language: C++

#include<iostream>
using namespace std;

int main(){
int a,b,o,x;
cin>>a>>b;
int furagu[998];
for(int y=0;y<1000;y++)cin>>furagu[y];
int day[998];
int z=furagu[y];
i=i+furagu[y];
dey[y]=i;
dey[o]=a+x;
dey[o+1]=b+x;
cout<<x<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'y' was not declared in this scope
   10 | int z=furagu[y];
      |              ^
a.cc:11:1: error: 'i' was not declared in this scope
   11 | i=i+furagu[y];
      | ^
a.cc:12:1: error: 'dey' was not declared in this scope; did you mean 'day'?
   12 | dey[y]=i;
      | ^~~
      | day
Language: C++

#include<iostream>
using namespace std;

int main(){
int a,b,o,x;
cin>>a>>b;
int furagu[998];
for(int y=0;y<1000;y++)cin>>furagu[y];
int day[998];
int z=furagu[y];
i=i+furagu[y];
dey[y]=i;
int o;
dey[o]=a+x;
dey[o+1]=b+x;
cout<<x<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'y' was not declared in this scope
   10 | int z=furagu[y];
      |              ^
a.cc:11:1: error: 'i' was not declared in this scope
   11 | i=i+furagu[y];
      | ^
a.cc:12:1: error: 'dey' was not declared in this scope; did you mean 'day'?
   12 | dey[y]=i;
      | ^~~
      | day
a.cc:13:5: error: redeclaration of 'int o'
   13 | int o;
      |     ^
a.cc:5:9: note: 'int o' previously declared here
    5 | int a,b,o,x;
      |         ^
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
using namespace std;
using ll = int64_t;
using ld = long double;
using ull = uint64_t;

//#define cerr if (false) cerr

ll n;

ll n;

int main() {
  ios::sync_with_stdio(0);
  cout.precision(10);

  sort(rall(possible));

  cin >> n;

  if (n < 1000) {
    cout << "ABC" << endl;
  } else {
    cout << "ABD" << endl;
  }

}



Compiler output:
a.cc:17:4: error: redefinition of 'll n'
   17 | ll n;
      |    ^
a.cc:15:4: note: 'll n' previously declared here
   15 | ll n;
      |    ^
a.cc: In function 'int main()':
a.cc:23:13: error: 'possible' was not declared in this scope
   23 |   sort(rall(possible));
      |             ^~~~~~~~
a.cc:4:18: note: in definition of macro 'rall'
    4 | #define rall(x) (x).rbegin(),(x).rend()
      |                  ^
Language: C++

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

int main()
{
	//int n = 0;
	//scanf("%d",&n);
	if (n>=0 && n < 1000) {
		printf("ABD");
	}
	else if (n>=1000 && n <= 1998) {
			printf("ABC");
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'n' was not declared in this scope
    8 |         if (n>=0 && n < 1000) {
      |             ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
    int a,b,c=0,max=0,min=0,x=0;
    cin>>a>>b;
    c=b-a;
    for(int i=1;i<=c;i++){
        max=max+i;
    }
    ans=max-b;
    cout<<x<<endl;
    return 0;
}

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

#include<iostream>
using namespace std;

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

    if(n<1000) cout << "ABC";
    else cout << "ABD"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected ';' before '}' token
    9 |     else cout << "ABD"
      |                       ^
      |                       ;
   10 | }
      | ~
Language: C++

#include<stdio.h>
int cal(int i;int k)
int main(){
int a,b=0;

scanf("%d",&a);
do{
b++;
a=cal(a,b);
}while(a>0);
printf("%d",b);
}
int cal(int i;int k){//iが金額kが回数
int l=1,m=1;
for(int k=0;l<a;k++)l=l*6;
for(int k=0;m<a;k++)m=m*9;
if(m==1||l==1){
return(i-1);
}else if(m-l>0){
return(i-m);
}else if (m-l<0){
return(i-l):
}
}


Compiler output:
a.cc:2:14: error: expected ')' before ';' token
    2 | int cal(int i;int k)
      |        ~     ^
      |              )
a.cc:2:20: error: expected initializer before ')' token
    2 | int cal(int i;int k)
      |                    ^
a.cc:13:14: error: expected ')' before ';' token
   13 | int cal(int i;int k){//iが金額kが回数
      |        ~     ^
      |              )
a.cc:13:20: error: expected initializer before ')' token
   13 | int cal(int i;int k){//iが金額kが回数
      |                    ^
Language: C++

n = gets.to_i

if n <= 999 then
  n = sprintf("%03d",n)
  print "ABC#{n}"
elsif
  n -= 999
  n = sprintf("%03d",n)
  print "ABD#{n}"
end

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

import java.util.Scanner;

public class ABD {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int times;
		times = in.nextInt();
		if(times>1 && times<=999){
			System.out.println("ABC");
		}else if(times<=1998){
			System.out.println("ABD");
		}
	}

}


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

using System;
class Program
{
    static void Main(string[] args)
    {
        int a = int.Parse(Console.ReadLine());
        int type = 1;
        while(a>=999){
          type++;
          a=a-999;
        }
      
      switch(type){
        case 2:Console.WriteLine("ABE");break;
      
        case 3:Console.WriteLine("ABD");break;
      
        case 1:Console.WriteLine("ABC");break;
      }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:4:22: error: 'string' has not been declared
    4 |     static void Main(string[] args)
      |                      ^~~~~~
a.cc:4:31: error: expected ',' or '...' before 'args'
    4 |     static void Main(string[] args)
      |                               ^~~~
a.cc:21:2: error: expected ';' after class definition
   21 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:6:17: error: expected primary-expression before 'int'
    6 |         int a = int.Parse(Console.ReadLine());
      |                 ^~~
a.cc:14:16: error: 'Console' was not declared in this scope
   14 |         case 2:Console.WriteLine("ABE");break;
      |                ^~~~~~~
Language: C++

                #include<iostream>
                #include<iomanip>
                #include<ios>
                using namespace std;
                int main(){
                     int x;
                     cin >> x;
                     if(x>=1000){
                          cout << "ABD";
                          cout << setfill('0') << right << setw(3) << x-999 << "\n";
                     }
                     else{
                          cout << "ABC"
                          cout << setfill('0') << right << setw(3) << x << "\n";
                     }
                     return 0;
                }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:40: error: expected ';' before 'cout'
   13 |                           cout << "ABC"
      |                                        ^
      |                                        ;
   14 |                           cout << setfill('0') << right << setw(3) << x << "\n";
      |                           ~~~~
Language: C++

#pragma warning(suppress : 4996)

int main()
{
	int n = 0;
	scanf("%d",&n);
	if (n < 1000) {
		printf("ABD");
		 if (n < 10) {
			 printf("00%d", n);
			}
		 else if (n >= 10 && n < 100) {
			 printf("0%d", n);
		 }
		 else if (n >= 100 && n < 1000) {
			 printf("%d", n);
		 }
	}
	else if (n>=1000 && n < 2000) {
			printf("ABC");
			if (n >= 1000 && n < 1010) {
				printf("00%d", n-999);
			}
			else if (n >= 1010 && n < 1100) {
				printf("0%d", n-999);
			}
			else if (n >= 1100 && n < 2000) {
				printf("%d", n-999);
			}
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf' was not declared in this scope
    6 |         scanf("%d",&n);
      |         ^~~~~
a.cc:8:17: error: 'printf' was not declared in this scope
    8 |                 printf("ABD");
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #pragma warning(suppress : 4996)
a.cc:20:25: error: 'printf' was not declared in this scope
   20 |                         printf("ABC");
      |                         ^~~~~~
a.cc:20:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include "stdafx.h"
#pragma warning(suppress : 4996)

int main()
{
	int n = 0;
	scanf("%d",&n);
	if (n < 1000) {
		printf("ABD");
		 if (n < 10) {
			 printf("00%d", n);
			}
		 else if (n >= 10 && n < 100) {
			 printf("0%d", n);
		 }
		 else if (n >= 100 && n < 1000) {
			 printf("%d", n);
		 }
	}
	else if (n>=1000 && n < 2000) {
			printf("ABC");
			if (n >= 1000 && n < 1010) {
				printf("00%d", n-999);
			}
			else if (n >= 1010 && n < 1100) {
				printf("0%d", n-999);
			}
			else if (n >= 1100 && n < 2000) {
				printf("%d", n-999);
			}
	}

}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

using System;

namespace ABC099_A
{
    class Program
    {
        static void Main(string[] args)
        {
            var N = int.Parse(Console.ReadLine());
            Console.WriteLine(N >= 1000 ? "ABD" : "ABC");
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:26: error: 'string' has not been declared
    7 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:7:35: error: expected ',' or '...' before 'args'
    7 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:12:6: error: expected ';' after class definition
   12 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ABC099_A::Program::Main(int*)':
a.cc:9:13: error: 'var' was not declared in this scope
    9 |             var N = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:10:13: error: 'Console' was not declared in this scope
   10 |             Console.WriteLine(N >= 1000 ? "ABD" : "ABC");
      |             ^~~~~~~
a.cc:10:31: error: 'N' was not declared in this scope
   10 |             Console.WriteLine(N >= 1000 ? "ABD" : "ABC");
      |                               ^
Language: C++

            #include<iostream>
            #include<iomanip>
            using namespace std;
            int main(){
                 int x;
                 cin >> x;
                 if(x>=1000){
                      cout << "ABD";
                      cout << setfill('0') << right << setw(3) << x-999 << "\n";
                 }
                 else{
                      cout << "ABC"
                      cout << setfill('0') << right << setw(3) << x << "\n";
                 }
                 return 0;
            }

Compiler output:
a.cc: In function 'int main()':
a.cc:12:36: error: expected ';' before 'cout'
   12 |                       cout << "ABC"
      |                                    ^
      |                                    ;
   13 |                       cout << setfill('0') << right << setw(3) << x << "\n";
      |                       ~~~~
Language: C++

#include <instream>
using namespace std;
int main();
{
	int ABC,ABD,n;
	cin>>n;
	if(1≤n≤999) cout<<ABCn;
	else(1000≤n≤1998) cout<<ABD n-1000;
}

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

int main()
{
	int n = 0;
	scanf("%d",&n);
	if (n < 1000) {
		printf("ABD");
		 if (n < 10) {
			 printf("00%d", n);
			}
		 else if (n >= 10 && n < 100) {
			 printf("0%d", n);
		 }
		 else if (n >= 100 && n < 1000) {
			 printf("%d", n);
		 }
	}
	else if (n>=1000 && n < 2000) {
			printf("ABC");
			if (n >= 1000 && n < 1010) {
				printf("00%d", n-999);
			}
			else if (n >= 1010 && n < 1100) {
				printf("0%d", n-999);
			}
			else if (n >= 1100 && n < 2000) {
				printf("%d", n-999);
			}
	}

}

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

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    int n, x, y, i;
    x = 100000;
    cin >> n;

    for (i = 0; i <= n; i++) {
        y = ((i / (6 * 6 * 6 * 6 * 6 * 6)) % 6)
            + ((i / (6 * 6 * 6 * 6 * 6)) % 6)
            + ((i / (6 * 6 * 6 * 6)) % 6)
            + ((i / (6 * 6 * 6)) % 6)
            + ((i / (6 * 6)) % 6)
            + ((i / (6)) % 6)
            + (i % 6)
            + ((n - i) / (9 * 9 * 9 * 9 * 9)) % 9 
            + ((n - i) / (9 * 9 * 9 * 9)) % 9 
            + ((n - i) / (9 * 9 * 9)) % 9 
            + ((n - i) / (9 * 9)) % 9 
            + ((n - i) / (9)) % 9 
            + (n - i) % 9;
        if (y < x)
            x = y;
    }   
    cout << x << endl;
}
~                                                                               
~      

Compiler output:
a.cc:30:1: error: expected class-name before '~' token
   30 | ~
      | ^
Language: C++

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

int n;

int mani() {
    cin >> n;
    if (n < 1000)
        cout << "ABC";
    if (n >= 1000)
        cout << "ABD";
    return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
using namespace std;

int main() {
    int n;
    while (~scanf("%d", &n)) {
        print("%s\n", (n < 1000)? "ABC" : "ABD");
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'print' was not declared in this scope; did you mean 'printf'?
    7 |         print("%s\n", (n < 1000)? "ABC" : "ABD");
      |         ^~~~~
      |         printf
Language: C++

# include<iostream>

int main(){
    using namespace std;
    int n;
    cin >> n;
    if(n < 1000){
        cout << "ABC" << endl;
    }else{
        cout << "ABD" << endl;
    }
    return 0;


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

#include<iostream.h>
using namespace std;

int main() {
    int n;
    while (~scanf("%d", &n)) {
        print("%s\n", (n < 1000)? "ABC" : "ABD");
    }
    return 0;
}


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

            #include<iostream>
            #include<iomanip>
            using namespace std;
            int main(){
                 int x;
                 cin >> x;
                 if(x>=1000){
                      cout.setfill('0') << "ABD" << setw(3) << x-999 << "\n";
                 }
                 else{
                      cout.setfill('0') << "ABC" << setw(3) << x << "\n";
                 }
                 return 0;
            }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: 'std::ostream' {aka 'class std::basic_ostream<char>'} has no member named 'setfill'
    8 |                       cout.setfill('0') << "ABD" << setw(3) << x-999 << "\n";
      |                            ^~~~~~~
a.cc:11:28: error: 'std::ostream' {aka 'class std::basic_ostream<char>'} has no member named 'setfill'
   11 |                       cout.setfill('0') << "ABC" << setw(3) << x << "\n";
      |                            ^~~~~~~
Language: C

#include <stdio.h>
int main(void)
{
    int　a,b;
    scanf("%d",&a);
    scanf("%d",&b);
    int num1;
    num1=b-a;
    int i;
    int sum=0;
    for(i=1; i<=num1; i++)
    { sum += i; }
    int sum2;
    sum2=sum-b;
     printf("%d",sum2);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:8: error: stray '\343' in program
    4 |     int<U+3000>a,b;
      |        ^~~~~~~~
Language: C

#include <stdio.h>
int main(void)
{
    int　a,b;
    scanf("%d",&a);
    scanf("%d",&b);
    int num1;
    num1=b-a;
    int i;
    int sum=0;
    for(i=1; i<=num1; i++)
    { sum += i; }
    int sum2;
    sum2=sum-b;
     printf("%d",sum2);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:8: error: stray '\343' in program
    4 |     int<U+3000>a,b;
      |        ^~~~~~~~
Language: C

#include <stdio.h>

int main(void){
  int n;
  
  scanf("%d",&n);
  n
  if( n < 1000 ) printf("ABC%d\n",n);
  else           printf("ABD%d\n",n-999);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:4: error: expected ';' before 'if'
    7 |   n
      |    ^
      |    ;
    8 |   if( n < 1000 ) printf("ABC%d\n",n);
      |   ~~
main.c:9:3: error: 'else' without a previous 'if'
    9 |   else           printf("ABD%d\n",n-999);
      |   ^~~~
Language: C++

        #include<iostream>
        #include<iomanip>
        using namespace std;
        int main(){
             int x;
             cin >> x;
             if(x>=1000){
                  cout << "ABD" << setfill('0') << setw(3) << x-999 << "\n";
             }
             else{
                  cout << "ABC" << setfil('0') << setw(3) << x << "\n";
             }
             return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:36: error: 'setfil' was not declared in this scope
   11 |                   cout << "ABC" << setfil('0') << setw(3) << x << "\n";
      |                                    ^~~~~~
Language: Java

import java.util.*;

public class NewClass1 {
    
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        if(n>= 1 && n<=999){
            System.out.println("ABC");
        }
        else if(n>=1000 && n<=1998){
            System.out.println("ABD");
        }

    }
}

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

    #include<iostream>
    using namespace std;
    int main(){
         int x;
         cin >> x;
         if(x>=1000){
              cout << "ABD" << setfill('0') << setw(3) << x-999 << "\n";
         }
         else{
              cout << "ABC" << setfil('0') << setw(3) << x << "\n";
         }
         return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: 'setfill' was not declared in this scope
    7 |               cout << "ABD" << setfill('0') << setw(3) << x-999 << "\n";
      |                                ^~~~~~~
a.cc:2:1: note: 'std::setfill' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 |     #include<iostream>
  +++ |+#include <iomanip>
    2 |     using namespace std;
a.cc:7:48: error: 'setw' was not declared in this scope
    7 |               cout << "ABD" << setfill('0') << setw(3) << x-999 << "\n";
      |                                                ^~~~
a.cc:7:48: note: 'std::setw' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
a.cc:10:32: error: 'setfil' was not declared in this scope
   10 |               cout << "ABC" << setfil('0') << setw(3) << x << "\n";
      |                                ^~~~~~
a.cc:10:47: error: 'setw' was not declared in this scope
   10 |               cout << "ABC" << setfil('0') << setw(3) << x << "\n";
      |                                               ^~~~
a.cc:10:47: note: 'std::setw' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
Language: C++

#include <iostream>
using namespace std;
int main() {
 int a;
 cin >> a;
if (a < 100) {
cout << "ABC"
}else {
cout << "ABD"
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before '}' token
    7 | cout << "ABC"
      |              ^
      |              ;
    8 | }else {
      | ~             
a.cc:9:14: error: expected ';' before '}' token
    9 | cout << "ABD"
      |              ^
      |              ;
   10 | }
      | ~
Language: C++

// last.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include<iostream>
#include "stdafx.h"
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{


	int nian;
	cin >> nian;
	if(nian<1000){
		cout<<"ABC";
	}else{
	
		cout<<"ABD";
	}

	return 0;

}

Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<cstdio>
using namespace std;
int main() {
	int n;
	scanf("%d",&n);
	printf("AB%c\n",'C'+n/999);
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main() {
	int n;
	scanf("%d",&n);
	printf("AB%c\n",'C'+n/999);
	return 0;
}

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

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

int main() {
  int a, b;
  cin >> a >> b;
  
  vector<int> l(999);
  l.at(0) = 1
  for(int i = 1; i < 998; i++) {
    l.at(i) = l.at(i - 1) + (i + 1);
  }
  
  for(int i = 0; i < 999; i++) {
    if(b - a == i + 1) {
      cout << l.at(i) - b << endl;
      break;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before 'for'
    9 |   l.at(0) = 1
      |              ^
      |              ;
   10 |   for(int i = 1; i < 998; i++) {
      |   ~~~         
a.cc:10:18: error: 'i' was not declared in this scope
   10 |   for(int i = 1; i < 998; i++) {
      |                  ^
Language: C++

nclude <iostream>

using namespace std;

int main() {
    int a;
    cin >> a;
    
    if(a < 1000){
        cout << "ABC" << endl;
    }else{
        cout << "ABD" << endl;
    }
        
    return 0;
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude <iostream>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> a;
      |     ^~~
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << "ABC" << endl;
      |         ^~~~
a.cc:10:26: error: 'endl' was not declared in this scope
   10 |         cout << "ABC" << endl;
      |                          ^~~~
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << "ABD" << endl;
      |         ^~~~
a.cc:12:26: error: 'endl' was not declared in this scope
   12 |         cout << "ABD" << endl;
      |                          ^~~~
Language: C++

#include <iosteream>

using namespace std;

int main(void) {
     int N;

     cin >> N;

     if (N > 0 && N < 1000) {
cout << "ABC";
}

else if (N > 999 && N < 1999) {
cout << "ABD";
}

return 0;
}

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

#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
if(n<=999){
 cout<<"ABC";
}
else{
cout<<"ABD"
}
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before '}' token
   10 | cout<<"ABD"
      |            ^
      |            ;
   11 | }
      | ~
Language: Java

		// Declare
		String out = null;

		// receive number
		int n = System.in.read();

		// check
		if (1 < n && n <= 999) {
			out = "ABC";
		} else if (1000 <= n && n <= 1998) {
			out = "ABD";
		}

		// Display
		System.out.print(out);

Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
		String out = null;
		^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
		if (1 < n && n <= 999) {
		^
Main.java:10: error: class, interface, enum, or record expected
		} else if (1000 <= n && n <= 1998) {
		^
Main.java:12: error: class, interface, enum, or record expected
		}
		^
4 errors
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
     
    int main()
    {
int a,b;
    while(cin>>a>>b)
    {
d=b-a;

ans=d*(d-1)/2-a;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'd' was not declared in this scope
    9 | d=b-a;
      | ^
a.cc:11:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 | ans=d*(d-1)/2-a;
      | ^~~
      | abs
Language: C++

int main()
{
    int a, b, c;
    cin >> a;
    if (a < 1000) cout << "ABC" << endl;
    else cout << "ABD" << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> a;
      |     ^~~
a.cc:5:19: error: 'cout' was not declared in this scope
    5 |     if (a < 1000) cout << "ABC" << endl;
      |                   ^~~~
a.cc:5:36: error: 'endl' was not declared in this scope
    5 |     if (a < 1000) cout << "ABC" << endl;
      |                                    ^~~~
a.cc:6:10: error: 'cout' was not declared in this scope
    6 |     else cout << "ABD" << endl;
      |          ^~~~
a.cc:6:27: error: 'endl' was not declared in this scope
    6 |     else cout << "ABD" << endl;
      |                           ^~~~
Language: C++

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

int main(void){
    int n; cin >> n;
    cout << ((n<1000) ? "ABC" : "ABD") << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     int n; cin >> n;
      |            ^~~
      |            std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << ((n<1000) ? "ABC" : "ABD") << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:43: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout << ((n<1000) ? "ABC" : "ABD") << endl;
      |                                           ^~~~
      |                                           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

	public static void main(String[] args) throws IOException {

		// Declare
		String out = null;

		// receive number
		int n = System.in.read();

		// check
		if (1 < n && n <= 999) {
			out = "ABC";
		} else if (1000 <= n && n <= 1998) {
			out = "ABD";
		}

		// Didplay
		System.out.print(out);
	}


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) throws IOException {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

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

#define mod 1000000007
#define ll long long

int main()
{
	ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    if(n<=999)cout<<"ABC";
    else cout<<"ABD"
	
}




Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected ';' before '}' token
   14 |     else cout<<"ABD"
      |                     ^
      |                     ;
   15 | 
   16 | }
      | ~
Language: Java

	public static void main(String[] args) throws IOException {

		// Declare
		String out = null;

		// receive number
		int n = System.in.read();

		// check
		if (1 < n && n <= 999) {
			out = "ABC";
		} else if (1000 <= n && n <= 1998) {
			out = "ABD";
		}

		// Didplay
		System.out.print(out);
	}
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) throws IOException {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:19: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

#include <stdio.h>

int main(int argc, char const *argv[]) {
	char str[101];
	int n;

	if (fgets(str, 100, stdin) == null) return 1;
	sscanf(str, "%d\n", &n);

	if (n < 1000) {
		printf("ABC%03d\n", n);
	} else {
		printf("ABD%03d\n", n-999);
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:7:39: error: 'null' was not declared in this scope
    7 |         if (fgets(str, 100, stdin) == null) return 1;
      |                                       ^~~~
Language: C++

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

int main 
{
    int n;

    cin>>n;

    if(n>999)
        cout<<"ABD";

    else
    cout<<"ABC";
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main
      |     ^~~~
a.cc:6:5: error: expected primary-expression before 'int'
    6 |     int n;
      |     ^~~
a.cc:6:5: error: expected '}' before 'int'
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
a.cc:8:5: error: 'cin' does not name a type
    8 |     cin>>n;
      |     ^~~
a.cc:10:5: error: expected unqualified-id before 'if'
   10 |     if(n>999)
      |     ^~
a.cc:13:5: error: expected unqualified-id before 'else'
   13 |     else
      |     ^~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include<stdio.h>

int main()
{
	int year;
	char name;
	scanf("%d", &year);
	if ((1<=year)&&(year <= 999))
	{
		name = 'C';
	}
	elif((1000 <= year) && (year <= 1998))
	{
		name = 'D';
	}
	printf("AB%C", name);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'elif' was not declared in this scope
   12 |         elif((1000 <= year) && (year <= 1998))
      |         ^~~~
Language: Java

import java.util.Scanner;

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

    String str = scan.next();
    int i = Integer.paraseInt(str);
    if(i > 999){
    	System.out.print("ABD");
    }else{
    	System.out.print("ABC");
    }
	}
}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
       ^
Main.java:8: error: cannot find symbol
    int i = Integer.paraseInt(str);
                   ^
  symbol:   method paraseInt(String)
  location: class Integer
2 errors
Language: Java

import java.io.IOException;

public class question1 {

	public static void main(String[] args) throws IOException {

		// Declare
		String out = null;

		// receive number
		int n = System.in.read();

		// check
		if (1 < n && n <= 999) {
			out = "ABC";
		} else if (1000 <= n && n <= 1998) {
			out = "ABD";
		}

		// Didplay
		System.out.print(out);
	}
}

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

#include <iostream>
using namespace std;

int main(){
  int N;
  cin>>N;
  if(N<=999) cout<<“ABC”<<endl;
  else cout<<“ABD”<<endl;
  return 0;
}


Compiler output:
a.cc:7:20: error: extended character “ is not valid in an identifier
    7 |   if(N<=999) cout<<“ABC”<<endl;
      |                    ^
a.cc:7:20: error: extended character ” is not valid in an identifier
a.cc:8:14: error: extended character “ is not valid in an identifier
    8 |   else cout<<“ABD”<<endl;
      |              ^
a.cc:8:14: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:7:20: error: '\U0000201cABC\U0000201d' was not declared in this scope
    7 |   if(N<=999) cout<<“ABC”<<endl;
      |                    ^~~~~
a.cc:8:14: error: '\U0000201cABD\U0000201d' was not declared in this scope
    8 |   else cout<<“ABD”<<endl;
      |              ^~~~~