Language: C++

#pragma comment(linker, "/stack:336777216")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>

// MACROS

using namespace std;
#define FASTIO ios_base::sync_with_stdio(false),cin.tie(0)
#define SSACTIV stringstream ss; ss << setprecision(7) << fixed
#define SETPREC cout << setprecision(7) << fixed
#define pub push_back
#define mp make_pair
#define fi first
#define se second
#define endl "\n"
#define ethres 0.0000001

// TYPEDEFS

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
template <typename T>
using vec3 = array<T, 3>;
template <typename T>
using vec2 = array<T, 2>;

// OSTREAM OVERLOADED FUNCTIONS

ostream& operator<<(ostream& os, const stringstream &ss) {
	os << ss.str();
	return os;
}

template <typename T>
ostream& operator<<(ostream& os, const vector<T> &v) {
	for (auto it = v.begin(); it != v.end(); it++) {
		os << *it << " ";
	}
	return os;
}

template <typename T, size_t x>
ostream& operator<<(ostream& os, const array<T, x> &v) {
	for (auto it = v.begin(); it != v.end(); it++) {
		os << *it << " ";
	}
	os << endl;
	return os;
}

// COMP FUNCTIONS FOR SORTING

template <typename T1, typename T2, typename T3, size_t x>
bool comp(const tuple<T1, T2, T3> &first, const tuple<T1, T2, T3> &second) {
	return get<x>(first) < get<x>(second);
}
bool comp(const string &a, const string &b) {
	return a.size() < b.size();
}
template <typename T1, typename T2, size_t x>
bool comp(const pair<T1, T2> &first, const pair<T1, T2> &second) {
	return first[x] < second[x];
}

// BIT MANIPULATION

template <typename T> int getbit(T s, int i) { return (s >> i) & 1; }
template <typename T> T onbit(T s, int i) { return s | (T(1) << i); }
template <typename T> T offbit(T s, int i) { return s & (~(T(1) << i)); }

// MATH

template<typename T>
T totient(const T &x) {
	T result = x;
	for (int i = 0; i*i <= n; i++) {
		if (n%i == 0) {
			while (n%i == 0) {
				n /= i;
			}
			result -= result / i;
		}
	}
	if (n > 1) {
		result -= result / x;
	}
	return result;
}

// 3D GEOMETRY

template<typename T>
T getdistance3dpointtoline(vec3<T> &A, vec3<T> &B, vec3<T> &C) {
	vec3<T> BA, BC;
	for (int i = 0; i < 3; i++) {
		BA[i] = A[i] - B[i];
		BC[i] = C[i] - B[i];
	}
	vec3<T> BAXBC;
	BAXBC[0] = BA[1] * BC[2] - BA[2] * BC[1];
	BAXBC[1] = BA[2] * BC[0] - BA[0] * BC[2];
	BAXBC[2] = BA[0] * BC[1] - BA[1] * BC[0];
	T modUP = 0.0, modDOWN = 0.0;
	for (int i = 0; i < 3; i++) {
		modUP += BAXBC[i] * BAXBC[i];
		modDOWN += BC[i] * BC[i];
	}
	T distance = modUP / modDOWN;
	return distance;
}

// MODULAR ARITHMATIC

template<typename T>
T modularexpo(T base, T exp, T mod) {
	T ans = 1;
	base = base % mod;
	while (exp > 0) {
		if (exp & 1) {
			ans = (ans * base) % mod;
		}
		exp >>= 1;
		base = (base * base) % mod;
	}
	return (ans % mod);
}

int main() {
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	FASTIO;
	int n;
	cin >> n;
	if (n <= 999) {
		cout << "ABC";
	}
	else {
		cout << "ABD";
	}
	return 0;
}

Compiler output:
a.cc: In function 'T totient(const T&)':
a.cc:78:32: error: 'n' was not declared in this scope
   78 |         for (int i = 0; i*i <= n; i++) {
      |                                ^
a.cc:86:13: error: 'n' was not declared in this scope
   86 |         if (n > 1) {
      |             ^