Problem:


Score : 100 points

Problem Statement

Decades have passed since the beginning of AtCoder Beginner Contest.

The contests are labeled as ABC001, ABC002, ... from the first round, but after the 999-th round ABC999, a problem occurred: how the future rounds should be labeled?

In the end, the labels for the rounds from the 1000-th to the 1998-th are decided: ABD001, ABD002, ..., ABD999.

You are given an integer N between 1 and 1998 (inclusive). Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

Constraints

1 \leq N \leq 1998

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

Sample Input 1

999

Sample Output 1

ABC

The 999-th round of AtCoder Beginner Contest is labeled as ABC999.

Sample Input 2

1000

Sample Output 2

ABD

The 1000-th round of AtCoder Beginner Contest is labeled as ABD001.

Sample Input 3

1481

Sample Output 3

ABD

The 1481-th round of AtCoder Beginner Contest is labeled as ABD482.



Sample input:
999


Sample output:
ABC

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=n
for i in range(n):
  cc=0
  t=i
  while t>0:
    cc=cc+t%6
    t=t//6
  t=n-i
  while t>0:
    cc=cc+t%9
    t=t//9
  if ans>cc:
    ans=cc
print(ans)

Submission status: Wrong Answer

Solution code:

# coding: utf-8

# In[40]:


N = int(input())


# In[41]:


third_letter = "C"


# In[42]:


a = int(N / 999)
b = N % 999


# In[43]:




# In[44]:


letter_ascii = ord(third_letter) + a


# In[45]:


letter = chr(letter_ascii)


# In[46]:

# In[47]:


output = "AB" + letter 


# In[48]:


print(output)

Submission status: Wrong Answer

Solution code:

# coding: utf-8

# In[28]:


N = 1854


# In[29]:


third_letter = "C"


# In[30]:


a = int(N / 999)
b = N % 999


# In[31]:




# In[32]:


letter_ascii = ord(third_letter) + a


# In[33]:


letter = chr(letter_ascii)


# In[34]:


# In[35]:


output = "AB" + letter


# In[36]:


print(output)

Submission status: Wrong Answer

Solution code:

# coding: utf-8

# In[28]:


N = 1854


# In[29]:


third_letter = "C"


# In[30]:


a = int(N / 999)
b = N % 999


# In[31]:


print(a)


# In[32]:


letter_ascii = ord(third_letter) + a


# In[33]:


letter = chr(letter_ascii)


# In[34]:

# In[35]:


output = "AB" + letter


# In[36]:


print(output)

Submission status: Wrong Answer

Solution code:

# coding: utf-8

# In[28]:


N = 1854


# In[29]:


third_letter = "C"


# In[30]:


a = int(N / 999)
b = N % 999


# In[31]:




# In[32]:


letter_ascii = ord(third_letter) + a


# In[33]:


letter = chr(letter_ascii)


# In[34]:


num = str(b)
for i in range(3):
    if len(num) < 3:
        num = "0" + num


# In[35]:


output = "AB" + letter + num


# In[36]:


print(output)

Submission status: Wrong Answer

Solution code:
n = int(input())

dp = [10 ** 5]*(n+1)
dp[0] = 0
for i in range(1, n+1):
    dp[i] = dp[i-1] + 1
    k = 6
    while i-k >= 0:
        dp[i] = min(dp[i], dp[i-k]+1)
        k *= 6
    k = 9
    while i-k >= 0:
        dp[i] = min(dp[i], dp[i-k]+1)
        k *= 9
print(dp[n])

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())

ans = N
res = 0
for i in range(N+1):
    res = 0
    t = i
    while t > 0:
        res += t%6
        t //= 6
    t = N - i
    while t > 0:
        res += t%9
        t //= 9

    if res < ans:
        ans = res



print(ans)

Submission status: Wrong Answer

Solution code:
print("AB"+"DC"[not (len(input())-3)])

Submission status: Wrong Answer

Solution code:
n = int(input())
list = []

while n > 9**5:
    n = n - 9**5
    list.append(1)

while n > 6**6:
    n = n - 6**6
    list.append(1)


while n > 6**5:
    n = n - 6**5
    list.append(1)


for i in [4,3,2,1]:

    for r in [9,6,]:
        while n > r**i:
            n = n - r**i
            list.append(r**i)



length = len(list) + n
print(length)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0
i = 10
dp = [0,1,2,3,4,5,1,2,3,1]
while i<=N:
    idx_n,idx_s = 0,0
    while i-(9**idx_n)>=0:
        idx_n += 1
    idx_n -= 1
    while i-(6**idx_s)>=0:
        idx_s += 1
    idx_s -= 1
    dp.append(min(1+dp[i-(9**idx_n)],1+dp[i-(6**idx_s)]))
    i += 1
print(dp[N])

Submission status: Wrong Answer

Solution code:
N = int(input())

num = []
cnt = 1

while True:
    tmp = 6**cnt
    if tmp <= 100000:
        num.append(tmp)
        cnt = cnt + 1
    else:
        break

cnt = 1

while True:
    tmp = 9**cnt
    if tmp <= 100000:
        num.append(tmp)
        cnt = cnt + 1
    else:
        break

num.sort()

def dfs(N, num,d):
    m = float('inf')
    if N < 6:
        return N + d
    for i in range(N):
        if N < num[i]:
            break
    for k in range(i):
        for j in range(N):
            if N < num[k] * j:
                break
        tmp = dfs(N - (j-1)*num[k], num,d+j-1)
        m = min(tmp, m)
    return m

ans = dfs(N, num,0)
print(ans)

Submission status: Wrong Answer

Solution code:
A = int(input())
def maxize(A,co):
    if A > 0: 
        num = [59049,46656,7776,6561,1296,729,216,81,36,9,6,1]
        for q in range(0,12):
            if A >= num[q]:
                num = num[q:]
                break
        
        B = A - num[0]
    
        co = co + 1
        maxize(B,co)
    else:
        print(co)
        
    return co
 
maxize(A,0)

Submission status: Wrong Answer

Solution code:
n = int(input())

nine = []
six = []


for i in range(10):
	nine.append(9**i)
	six.append(6**i)



nine.extend(six)
nine.sort()

count = 0
while n > 0:
	if n < 6 : 
		count += n
		n = 0
	elif n == 6:
		count +=1
		n = 0 
	else :
		i = 0
		while nine[i+1] <= n and (n-nine[i+1] > 5 ) :
			i += 1
		
		count += 1
		n = n - nine[i]

		
		
print count

Submission status: Wrong Answer

Solution code:
def power_of_six(n):
    now = 1
    power = 0
    while now <= n:
        now = now * 6
        power = power + 1
    return power-1

def power_of_nine(n):
    now = 1
    power = 0
    while now <= n:
        now = now * 9
        power = power + 1
    return power-1

def main():
    N = input()
    x = 0
    powsix = 0
    pownine = 0
    while N > 0:
        if N < 18:
            if N<12:
                x = x + N/9 + N%9
                break
            else:
                x = x + N/6 + N%6
                break
        else:
            powsix = power_of_six(N)
            pownine = power_of_nine(N)
            if 6**powsix > 9**pownine:
                N = N - 6**powsix
                x = x + 1
            else:
                N = N - 9**pownine
                x = x + 1
    print(x)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = input()

if len(N) < 4:
    N = int(N)
    print("ABC{0:03d}".format(N))
else:
    N = int(N[1:])
    N = N + 1
    print("ABD{0:03d}".format(N))

Submission status: Wrong Answer

Solution code:
print((0,0,0,'ABC','ABD')[len(input())])

Submission status: Wrong Answer

Solution code:
from math import log
from functools import lru_cache
     
n=int(input())
     
a=int(log(n,6))
b=int(log(n,9))
l=list(set([1]+[6**i for i in range(a+1)]+[9**i for i in range(b+1)]))
     
@lru_cache(maxsize=100000)
def func(n):
    if n<=0: return 1000000
    if n in l:return 1
    return min([func(n-li) for li in l])+1
     
print(func)

Submission status: Wrong Answer

Solution code:
N = input()

if len(N) < 4:
    N = int(N)
    print("ABC{0}".format(N))
else:
    N = int(N)
    N = N - 1
    print("ABD{0}".format(N))

Submission status: Wrong Answer

Solution code:
#coding:utf-8

N = int(input())
snList = []

def sixDev(N, times):
    n = 0
    if N == 0:
        global snList
        snList.append(times)
        return times
    while True:
        if 6**n <= N < 6**(n+1):
            q = N // 6**n
            sixDev(N % 6**n, times+q), nineDev(N % 6**n, times+q)
            break
        n += 1

def nineDev(N, times):
    n = 0
    if N == 0:
        global snList
        snList.append(times)
        return times
    while True:
        if 9**n <= N < 9**(n+1):
            q = N // 9**n
            sixDev(N % 9**n, times+q), nineDev(N % 9**n, times+q)
            break
        n += 1


times = 0
a = sixDev(N, times)
b = nineDev(N, times)

print(min(snList))

Submission status: Wrong Answer

Solution code:
n=input()
if len(n)==3:
    print("ABC")
else:
    print("ABD")

Submission status: Wrong Answer

Solution code:
import math
import sys

N = int(sys.stdin.readline())

queue = [(N, 0)]
check = set()
MAX_CNT = 9999999
min_cnt = MAX_CNT

def add_queue(X):
    if X not in check:
        check.add(X)
        queue.append(X)

while queue:
    N, cnt = queue.pop()
    if N >= 9:
        v = int(math.pow(9, int(math.log(N, 9))))
        if N - v >= 6 and cnt < min_cnt:
            add_queue((N - v, cnt + 1))
        elif cnt + (N - v) + 1 < min_cnt:
            min_cnt = cnt + int(N - v) + 1
    if N >= 6:
        v = int(math.pow(6, int(math.log(N, 6))))
        if N - v >= 6 and cnt < min_cnt:
            add_queue((N - v, cnt + 1))
        elif cnt + (N - v) + 1 < min_cnt:
            min_cnt = cnt + int(N - v) + 1

if min_cnt == MAX_CNT:
    print(N)
else:
    print(min_cnt)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
cond = n <= 999 or (n & 1) == 1

print("ABC" if cond else "ABD")

Submission status: Wrong Answer

Solution code:
N = int(input())
num = 0
drawlist = [1, 6, 6**2, 6**3, 6**4, 6**5, 6**6,
            9, 9**2, 9**3, 9**4, 9**5]
drawlist.sort()
drawlist.reverse()
while N:
    for d in drawlist:
        if N >= d:
            N = N - d
            num = num + 1
            break
print(num)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N >= 1000:
    print('ABC')
else:
    print('ABC')

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 1000:
    print('ABC' + '{0:03d}'.format(N))
else:
    print('ABD' + '{0:03d}'.format(N%999))

Submission status: Wrong Answer

Solution code:
N = int(input())
if N >= 1000:
    print('ABC'+str(N-1000))
else:
    print('ABC'+str(N))

Submission status: Wrong Answer

Solution code:
#coding : utf-8

if __name__ == '__main__':

    N = int(input())
    n = int(N/999)
    if n == 0:
        print('ABC')
    elif n == 1:
        print('ABD')
    elif n == 2:
        print('ABE')

Submission status: Wrong Answer

Solution code:
#coding : utf-8

if __name__ == '__main__':

    N = int(input())
    n = N%999
    if n == 0:
        print('ABC')
    elif n == 1:
        print('ABD')
    elif n == 2:
        print('ABE')

Submission status: Wrong Answer

Solution code:
import numpy as np
N =int(input())
K=''
if N > 999:
    N -= 999
    if N<10:
        K = 'ABD00' +str (N)
    elif N < 100:
        K = 'ABD0' + str(N)
    else:
        K = 'ABD' + str(N)
else:
    if N<10:
        K = 'ABC00' + str(N)
    elif N < 100:
        K = 'ABC0' + str(N)
    else:
        K = 'ABC' + str(N)
print(K)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n <=9:
  print("ABC00"+str(n))
elif n <= 99:
  print("ABC0"+str(n))
elif n <= 999:
  print("ABC"+str(n))
elif n <= 1008:
  print("ABD00"+str(n%999))
elif n <= 1098:
  print("ABD0"+str(n%999))
else:
  print("ABD"+str(n%999))

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<=99:
    print("ABC")
else:
    print("ABD")

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    dp = [float('inf')]*(n+1)
    dp[0] = 0

    ls = [1, 6, 9]
    ks = [1]

    for l in ls[1:]:
        i = 1
        while True:
            if l ** i <= n:
                ks.append(l**i)
            else:
                break
            i += 1

    for k in ks:
        for i in range(len(dp)):
            if i+k >= len(dp):
                break
            if dp[i]+1 < dp[i+k]:
                dp[i+k] = dp[i]+1
    print(dp[n])

main()

Submission status: Wrong Answer

Solution code:
n = int(input())

contest = "ABC"
if n >= 1000:
    contest = "ABD"

print("{}{:0>3}".format(contest,n%1000))

Submission status: Wrong Answer

Solution code:
n = int(input())

if n >= 1000:
    n -= 999
    s = 'D'
else:
    s = 'C'

ns = format(n, '03')
print("AB{}{}".format(s, ns))

Submission status: Wrong Answer

Solution code:
line = input()

num = int(line)

if num < 1000:
    print("ABC" + str(num))
else:
    print("ABD" + str(num - 1000))

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<1000:
    if len(str(n))==1:
        print('ABC00'+str(n))
    elif len(str(n))==2:
        print('ABC0'+str(n))
    else:
        print('ABC'+str(n))
else:
    if len(str((n%1000)+1))==1:
        print('ABD00'+str((n%1000)+1))
    elif len(str((n%1000)+1))==2:
        print('ABD0'+str((n%1000)+1))
    else:
        print('ABD'+str((n%1000)+1))

Submission status: Wrong Answer

Solution code:
n = int(input())

if n >= 1000:
    n -= 999
    s = 'D'
else:
    s = 'C'

ns = "{0:03d}".format(n)
print("AB{}{}".format(s, ns))
# print("{0:03d}".format(n))

Submission status: Wrong Answer

Solution code:
N = int(input())
if N <= 999:
    if N < 10:
        print('ABC00'+str(N))
    elif N < 100:
        print('ABC0'+str(N))
    else:
        print('ABC'+str(N))
else:
    N = N - 999
    if N < 10:
        print('ABD00'+str(N))
    elif N < 100:
        print('ABD0'+str(N))
    else:
        print('ABD'+str(N))

Submission status: Wrong Answer

Solution code:
N = int(input())
print('ABC999')

Submission status: Wrong Answer

Solution code:
N = int(input())
print('ABC999')
if N <= 999:
    if N < 10:
        print('ABC00'+str(N))
    elif N < 100:
        print('ABC0'+str(N))
    else:
        print('ABC'+str(N))
else:
    N = N - 999
    if N < 10:
        print('ABD00'+str(N))
    elif N < 100:
        print('ABD0'+str(N))
    else:
        print('ABD'+str(N))

Submission status: Wrong Answer

Solution code:
N = int(input())
if N <= 999:
    if N < 10:
        print('ABC00'+str(N))
    elif N < 100:
        print('ABC0'+str(N))
    else:
        print('ABC'+str(N))
else:
    N = N - 999
    if N < 10:
        print('ABD00'+str(N))
    elif N < 100:
        print('ABD0'+str(N))
    else:
        print('ABD'+str(N))

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<=999:
  print('ABC'+'{0:03d}'.format(n))
else:
  n=n-999
  print('ABD'+'{0:03d}'.format(n))

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 1000:
    print('ABC{:03}'.format(N))
else:
    print('ABD{:03}'.format(N - 999))

Submission status: Wrong Answer

Solution code:
num = int(input())

if num < 1000:
  print("ABC")
elif (1000 < num < 1999):
  print("ABD")
else:
  print("error")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 'D' if n > 999 else 'C'
print('AB' + s + '{0:03d}'.format(n % 1000))

Submission status: Wrong Answer

Solution code:
N=int(input())

if N < 1000:
    print("ABD0")
else:
    print("ABD1")

Submission status: Wrong Answer

Solution code:
n = int(input()) % 999

if n <=9:
  print("ABC00"+str(n))
elif n <= 99:
  print("ABC0"+str(n))
else:
  print("ABC"+str(n))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())

if n >= 1000:
    n -= 999
    s = 'D'
else:
    s = 'C'

ns = "{0:03d}".format(n)
print("AB{}{}".format(s, ns))
# print("{0:03d}".format(n))

Submission status: Wrong Answer

Solution code:
# https://beta.atcoder.jp/contests/abc099/tasks/abc099_a
# A - ABD

# A_ABD.py

N = int(input())

C_or_D = (N-1) // 999


name = ""

if C_or_D == 0:
    name += "ABC"
    n = N
elif C_or_D == 1:
    name += "ABD"
    n = '{0:03d}'.format(N - 999)

name += str(n)

print(name)

Submission status: Wrong Answer

Solution code:
N=int(input())
N=1000
if N>=1000:
  print("ABD")
else:
  print("ABC")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N <= 999:
    if N < 10:
        print('ABC00'+str(N))
    elif N < 100:
        print('ABC0'+str(N))
    else:
        print('ABC'+str(N))
else:
    N = N - 999
    if N < 10:
        print('ABC00'+str(N))
    elif N < 100:
        print('ABC0'+str(N))
    else:
        print('ABC'+str(N))

Submission status: Wrong Answer

Solution code:
N = int(input())

c_or_d = ["C", "D"][N // 1000]
if N >= 1000:
    N += 1

print("AB{}{:03}".format(c_or_d, N % 1000))

Submission status: Wrong Answer

Solution code:
N = int(input())
if N >= 1000:
    hya = str(N - 999).rjust(3, '0')
    print('ABD' + hya)
else:
    hya = str(N).rjust(3, '0')
    print('ABC' + hya)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())

if n >= 1000:
  n -= 999
  s = 'D'
else:
  s = 'C'

ns = "{0:03d}".format(n)
print("AB{}{}".format(s, ns))
# print("{0:03d}".format(n))

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 1000:
    print('ABC')
else:
    print('ADB')

Submission status: Wrong Answer

Solution code:
n = int(input())

s = 'ABC' if n < 1000 else 'ABD'
flag = n >= 1000
tmp = n%1000
if tmp < 100:
    s += '0'
if tmp < 10:
    s += '0'
print(s + str(n%1000 + flag))

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 1000:
    print('ABC'+str(n).zfill(3))
else:
    print('ABD'+str(n-999).zfill(3))

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 1000:
  print('ABC{:0>3}'.format(n))
else:
  print('ABD{:0>3}'.format(n-999))

Submission status: Wrong Answer

Solution code:
n = int(input())
if n <= 999:
    print("ABC{0:03d}".format(n))
else:
    print("ABD{0:03d}".format(abs(n-1000+1)))

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<=999:
  print('ABC'+str(n))
else:
  n=n-999
  print('ABD'+str(n))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 'D' if n > 1000 else 'C'
print('AB' + s + str(n % 1000))

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 1000:
    print("ABC" + '{0:03d}'.format(N))
else:
    print("ABD" + '{0:03d}'.format(N - 1000 + 1))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def inpl(): return map(int, input().split())
N = int(input())

if N >= 1000:
    print("ABD{:03}".format(N-999))
else:
    print("ABC{:03}".format(N))

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())

    if N > 999:
        print('ABC')
    else:
        print('ABD')

main()

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 1000:
    print('ABC' + '{0:03d}'.format(N))
else:
    print('ABD' + '{0:03d}'.format(N - 999))

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 1000:
    print('ACB')
else:
    print('ADB')

Submission status: Wrong Answer

Solution code:
N = int(input())
if N >= 1000:
    hya = str(N - 999)
    print('ABD' + hya)
else:
    hya = str(N)
    print('ABC' + hya)

Submission status: Wrong Answer

Solution code:
n = int(input())
if(n <= 999):
    print('ABC' + str(n))
else:
    print('ABD' + str(n))

Submission status: Wrong Answer

Solution code:
N = int(input())
if N <= 999:
    print("ABC{0:03d}".format(N))
else:
    print("ABD{0:03d}".format(N-999))

Submission status: Wrong Answer

Solution code:
N=int(input())
if(N<=999):
    print("ABC")
if(N>=1000&N<=1998):
    print("ABD")

Submission status: Wrong Answer

Solution code:
n = int(input())
res = ""

if(n < 1000):
    res = "ABC"
else:
    res = "ABD"

Submission status: Wrong Answer

Solution code:
n = int(raw_input())

if n < 1000:
  print "ABC%03d" % n
else:
  print "ABD%03d" % (n-999)

Submission status: Wrong Answer

Solution code:
n=int(input())

if n>1000:
    print("ABD")
else:
    print("ABC")

Submission status: Wrong Answer

Solution code:
s = int(input())

if s > 999:
    print("ABD" + str(s - 999))
else:
    print("ABC" + str(s))

Submission status: Wrong Answer

Solution code:
n = int(input())
print("ABC"+str(n%1000))

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 1000:
    print('ACB', end='')
else:
    print('ADB', end='')
    n -= 999
print(n)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, AB):
    ans = 0
    return ans


def main():
    N = read_int()
    if N > 999:
        print('ABD')
    print('ABC')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
if int(input()) <= 999:
   print('ABC')
else:
   print('ABD')

Submission status: Accepted

Solution code:
if int(input())<=999:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
n=int(input())

if n<1000:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
n=int(input())

if n<=999:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
n = int(input())
if n <= 999:
  print("ABC")
else:
  print("ABD")

Submission status: Accepted

Solution code:
N = int(input())
print("ABC") if N < 1000 else print("ABD")

Submission status: Accepted

Solution code:
n = int(input())
print('ABC' if n <= 999 else 'ABD')

Submission status: Accepted

Solution code:
n = int(input())
if(n < 1000): print('ABC')
else: print('ABD')

Submission status: Accepted

Solution code:
N = int(input())
if N<1000:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
n = int(input())
print("ABC" if n <= 999 else "ABD")

Submission status: Accepted

Solution code:
n = int(input())
if n >= 1000:
    print('ABD')
else:
    print('ABC')

Submission status: Accepted

Solution code:
moji = int(input())
print(("ABC","ABD")[moji >=1000])

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    print("ABC" if n < 1000 else "ABD")


main()

Submission status: Accepted

Solution code:
N=int(input())
if N<=999:
  print('ABC')
else:
  print('ABD')

Submission status: Accepted

Solution code:
N = int(input())
S = 'ABC'
if 1000 <= N <= 1998:
    S = 'ABD'

print(S)

Submission status: Accepted

Solution code:
N = int(input())

if N < 1000:
    print('ABC')
else:
    print('ABD')

Submission status: Accepted

Solution code:
X = int(input())

if X < 1000:
  print('ABC')
else:
  print('ABD')

Submission status: Accepted

Solution code:
N = int(input())
print('ABC' if N <= 999 else 'ABD')

Submission status: Accepted

Solution code:
n = int(input())

if n <= 999:
  print('ABC')
elif n <= 1998:
  print('ABD')

Submission status: Accepted

Solution code:
print(["ABC","ABD"][len(input())>3])

Submission status: Accepted

Solution code:
n=int(input())

if n<=999:
    ans="ABC"
else:
    ans="ABD"
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
if n < 1000:
  print("ABC")
else:
  print("ABD")

Submission status: Accepted

Solution code:
n = int(input())

if n > 0 and n < 1000:
    print('ABC')
elif n >= 1000 and n <= 1998:
    print('ABD')

Submission status: Accepted

Solution code:
n=int(input())
if n>=1000:
  print('ABD')
else:
  print('ABC')

Submission status: Accepted

Solution code:
import sys
import heapq
# \n
def input():
    return sys.stdin.readline().rstrip()


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

    if N>999:
        print("ABD")
    else:
        print("ABC")









if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

if n <= 999:
    print("ABC")
elif n > 999:
    print("ABD")

Submission status: Accepted

Solution code:
print("ABC" if int(input()) < 1000 else "ABD")

Submission status: Accepted

Solution code:
n=int(input())
if n>999:
    print("ABD")
else:
    print("ABC")

Submission status: Accepted

Solution code:
print(["ABC","ABD"][int(input())//1000])

Submission status: Accepted

Solution code:
n = int(input())
if 1 <= n and n <= 999:
    print('ABC')
else:
    print('ABD')

Submission status: Accepted

Solution code:
n = int(input())
if(n<=999):
  print("ABC")
else:
  print("ABD")

Submission status: Accepted

Solution code:
n = int(input())
if n <1000:
  print("ABC")
else:
  print("ABD")

Submission status: Accepted

Solution code:
N=int(input())
if N<1000:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
a = int(input())
if a < 1000:
  print('ABC')
else:
  print('ABD')

Submission status: Accepted

Solution code:
N = int (input ())

if N <= 999:
    print ("ABC")

else:
    print ("ABD")

Submission status: Accepted

Solution code:
number = int(input())

answer = ''
if number < 1000:
    answer = 'ABC'
else:
    answer = 'ABD'

print(answer)

Submission status: Accepted

Solution code:
n = int(input())
if n > 999:
  print("ABD")
else:
  print("ABC")

Submission status: Accepted

Solution code:
n=int(input())
if n<=999:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
n = int(input())
if n<1000:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
a='ABD'
if int(input())<1000:a='ABC'
print(a)

Submission status: Accepted

Solution code:
N = int(input())

print('ABC') if N < 1000 else print('ABD')

Submission status: Accepted

Solution code:
N = int(input())
print("ABC" if N <= 999 else "ABD")

Submission status: Accepted

Solution code:
n = int(input())
if n <= 999:
    print('ABC')
else:
    print('ABD')

Submission status: Accepted

Solution code:
N = int(input())
if N <= 999:
    print('ABC')
else:
    print('ABD')

Submission status: Accepted

Solution code:
N = int(input())
if 1 <= N <= 999:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
def main():
    n = int(input())

    if n < 1000:
        print("ABC")
    else:
        print("ABD")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

if n < 1000:
    ans = 'ABC'
else:
    ans = 'ABD'

print(ans)

Submission status: Accepted

Solution code:
# A - ABD

N = int(input())

if 1 <= N < 1000:
    print('ABC')
elif 1000<= N < 1999:
    print('ABD')
elif N <= 0 or 1999 <= N:
    print('Out of range')

Submission status: Accepted

Solution code:
N = int(input())

if N <= 999:
    print('ABC')
else:
    print('ABD')

Submission status: Accepted

Solution code:

n=int(input())
if n < 1000:
    print('ABC')
else:
    print('ABD')

Submission status: Accepted

Solution code:
N = int(input())

if 1 <= N <= 999:
    print('ABC')
else:
    print('ABD')

Submission status: Accepted

Solution code:
N = int(input())
if N <= 999:
    print('ABC')
else:
    print('ABD')

Submission status: Accepted

Solution code:
n = int(input())
if 1 <= n and n <= 999:
  print("ABC")
else:
  print("ABD")

Submission status: Accepted

Solution code:
n = int(input())

if n >= 1000:
    print('ABD')
else:
    print('ABC')

Submission status: Accepted

Solution code:
N=int(input())
if N<1000:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
if int(input()) < 1000:
  print("ABC")
else:
  print("ABD")

Submission status: Accepted

Solution code:
n = int(input())


if n<=999 :
    c = 'ABC'
else :
    c = 'ABD'

print(c)

Submission status: Accepted

Solution code:
N = int(input())

if 1 <= N < 1000:
    print('ABC')
else:
    print('ABD')

Submission status: Accepted

Solution code:
# 入力
N = int(input())

# 処理&出力
if N < 1000:
    print('ABC')
elif 1000 <= N <= 1998:
    print('ABD')
else:
    print('IDK')

Submission status: Accepted

Solution code:
contest_N = int(input())

if contest_N >= 1000:
    print('ABD')
else:
    print('ABC')

Submission status: Accepted

Solution code:
N = int(input())

if N < 1000:
    print('ABC')

else :
    print('ABD')

Submission status: Accepted

Solution code:
contest_num = int(input())

if contest_num >= 1999:
    result_str = 'The contest has not been held'

elif contest_num < 1000:
    result_str = 'ABC'

elif contest_num >= 1000:
    result_str = 'ABD'

print(result_str)

Submission status: Accepted

Solution code:
N = input()
x = int(N)

if x > 0 and x < 1000:
    answer = 'ABC'
elif x >= 1000 and x <= 1998:
    answer = 'ABD'

print(answer)

Submission status: Accepted

Solution code:
N = int(input())

if N < 1000:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
# 1 <= N <= 1998
N = int(input())

if N <= 999:
    print("ABC")
elif 1000 <= N <=1998:
    print("ABD")

Submission status: Accepted

Solution code:
N=int(input())

if N<=999:
  print('ABC')
else:
  print('ABD')

Submission status: Accepted

Solution code:
#099A

#1.入力をちゃんと受け取ること
x=input()
i=int(x)
#2.結果を出力する

if i<1000 :
    print('ABC')
elif i<=1998:
    print('ABD')

Submission status: Accepted

Solution code:
N = int(input())

if N <= 999:
    print('ABC')
elif N >999:
    print('ABD')

Submission status: Accepted

Solution code:
N = int(input())

if N >= 1000:
    print("ABD")
if N < 1000:
    print("ABC")

Submission status: Accepted

Solution code:
N = int (input())

if N < 1000:
    print('ABC')
elif N >= 1000:
    print('ABD')

Submission status: Accepted

Solution code:
# N回目のコンテストの名前の最初の３文字を出力

N = int ( input ( ) )

if 1 <= N <= 999:
    print("ABC")
elif 1000 <= N <= 1998:
    print("ABD")
else:
    print("入力ミス")

Submission status: Accepted

Solution code:
n=int(input())
if n>=1000:
  print("ABD")
else:
  print("ABC")

Submission status: Accepted

Solution code:
# ABD
# AtCoder Beginner Contestが始まってから早数十年。
# コンテストは1回目から順に ABC001,ABC002,...,と名付けられてきましたが、 999回目のコンテスト ABC999 を終え、
# これからのコンテストの名前をどうするかという問題が生じました。
# そこで、1000回目から1998回目のコンテストを順に ABD001,ABD002,...,ABD999 と名付けることとなりました。
# 1以上1998以下の整数Nが与えられるので、N回目のコンテストの名前の最初の3文字を出力してください。

# 1 < N < 1998
# Nは整数

N = int(input())

# N回目のコンテストの最初の三文字を出力せよ。

if 1<= N <= 999:
    print("ABC")
elif 1000 <= N <= 1998:
    print("ABD")

Submission status: Accepted

Solution code:
n = int(input())
if n<=999:
  print("ABC")
else:
  print("ABD")

Submission status: Accepted

Solution code:
N = int(input(""))
if N <= 999:
    print("ABC")
elif 1000 <= N <= 1998:
    print("ABD")
else:
    print("error")

Submission status: Accepted

Solution code:
n=int(input())
x=n-999 if n>999 else n
if n>999:
    print("ABD")
else:
    print("ABC")

Submission status: Accepted

Solution code:
N = int(input())

if N < 1000:
    print("ABC")
else:
    print("ABD")

Submission status: Accepted

Solution code:
N = int(input())
if 1 <= N <= 999:
    print("ABC")
elif 1000 <= N <= 1998:
    print("ABD")

Submission status: Accepted

Solution code:
N = int(input())
if 1 <= N <= 999:
    print('ABC')
elif 1000 <= N <= 1998:
    print('ABD')

Submission status: Accepted

Solution code:
# 099A

# N回目(数値）：標準入力
N = int(input())

# 1~999回目：ABC001~ABC999
# 1000~1998回目：ABD001~ABD999
# N回目のコンテストの名前の最初の3文字を出力

if N < 1000:
    print('ABC')
elif 1000 <= N <= 1998:
    print('ABD')

Submission status: Accepted

Solution code:

N = int(input())
if N >= 1000:
    print("ABD")
else:
    print("ABC")

Submission status: Accepted

Solution code:
# 1000回目から1998回目のコンテストを順に ABD001,ABD002,...,ABD999

N = int(input())

if N < 1000:
    print('ABC')

else :
    print('ABD')