TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
N = int(input())
under = "ABC"
over = "ABD"

if N > 1000:
  tmp = str(N-1000)
  print(over + tmp)
else:
  tmp = str(N)
  print(under + tmp)

N = int(input())
under = "ABC"
over = "ABD"

if N > 1000:
#  tmp = str(N-1000)
  print(over)
elif N == 1000:
  print("ABD")
else:
#  tmp = str(N)
  print(under)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
inf = 1000*500*500
D = []
c = []
d = {}
N,C = map(int,input().split())
for i in range(C):
    D.append(list(map(int,input().split())))
for i in range(N):
    c.append(list(map(int,input().split())))

for C1 in range(C):
    for C2 in range(C):
        for C3 in range(C):
            if C1 != C2 and C2 != C3 and C3 != C1:
                d[(C1+1,C2+1,C3+1)]=0
            else:
                d[C1+1,C2+1,C3+1]=inf

for i in range(N):
    for j in range(N):
        for C1 in range(C):
            for C2 in range(C):
                for C3 in range(C):
                    if (i+j)%3==0:
                        d[(C1+1,C2+1,C3+1)]+=D[c[i][j]-1][C1]
                    elif (i+j)%3==1:
                        d[(C1+1,C2+1,C3+1)]+=D[c[i][j]-1][C2]
                    else:
                        d[(C1+1,C2+1,C3+1)]+=D[c[i][j]-1][C3]

l = []
for x in d:
    l.append(d[x])
print(min(l))


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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
ｆｇｈｊ

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)

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


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)


N = int(input())

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
n = int(input())
if n>999:
    print("ABC")
else:
    print("ABD")

import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
n = int(input())
if n<1000:
    print("ABC")
else:
    print("ABD")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

# 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)




# 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)




# 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)




# 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)




# coding: utf-8

# In[95]:


N = int(input())


# In[96]:


third_letter = "C"


# In[97]:


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


# In[99]:


letter_ascii = ord(third_letter) + a


# In[100]:


letter = chr(letter_ascii)


# In[101]:


output = "AB" + letter


# In[102]:


print(output)



Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

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


N = int(input())

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

N = int(input())

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


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

import numpy as np
N =int(input())
K=''
if N > 999:
    K='ABD'
else:
    K='ABC'
print(K)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
if(n > 999):
	print("ABD{}".format(n % 1000))
else:
	print("ABC{}".format(n))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
if n>=1000:
    print('ABD{}'.format(n-999))
else:
    print('ABC{}'.format(n))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N,C=map(int,input().split())

D=[list(map(int,input().split())) for i in range(C)]
grid=[list(map(int,input().split())) for i in range(N)]

a=[[0]*C for i in range(3)]


for i in range(N):
    tmp=i%3
    for j in range(N):
        a[tmp][grid[i][j]-1]+=1
        tmp=(tmp+1)%3

b=[[0]*C for i in range(3)]
for i in range(3):
    for j in range(C):
        b[i][j]=sum([ D[k][j] * a[i][k] for k in range(C)])

b=[ sorted([ [b[i][j],j] for j in range(C)]) for i in range(3)]

ans=1000000000
for i in range(3):
    for j in range(3):
        for k in range(3):
            if b[0][i][1]!=b[1][j][1] and b[1][j][1]!=b[2][k][1] and b[2][k][1]!=b[0][i][1]:
                ans=min(ans,b[0][i][0]+b[1][j][0]+b[2][k][0])

print(ans)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = input()
if n >= 1000:
    ans = "ABD"
else:
    ans = "ABC"
print(ans)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())

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

n = int(input())

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
if N<1000:
  print('ABC{0}'.format(N))
else:
  print('ABD{0}'.format((N+1)%1000))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
print('ABC{}'.format(n) if n<1000 else 'ABD{}'.format(n-999))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
DP = [100000000] * (N+1)
DP[0] = 0
for i in range (N):
    DP[i + 1] = DP[i] + 1
    for j in range (8):
        if 6**j <= i + 1:
            DP[i + 1] = min(DP[i + 1],DP[i + 1 - 6**j] + 1)
    for j in range (8):
        if 9**j <= i + 1:
            DP[i + 1] = min(DP[i + 1],DP[i + 1 - 9**j] + 1)
print(DP[N])

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
if n > 999:
	print('ABD')
else:
	print('ABD')

n = int(input())
if n > 999:
	print('ABD')
else:
	print('ABC')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
A, B = map(int, input().split())
 
diff = B - A
height_A = diff * (diff - 1) // 2
 
ans = height_A - A
 
print(ans)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
if n<1000:
    n_s=str(n).zfill(3)
    print("ABC"+n_s)
else:
    n=n%1000+1
    n_s=str(n).zfill(3)
    print("ABD"+n_s)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
if N<1000:
    print('ABC%03d'%(N))
else:
    N=N-999
    print('ABD%03d'%(N))

N=int(input())
if N<1000:
    print('ABC%03d'%(N))
else:
    N=N-999
    print('ABD%03d'%(N))

N=int(input())
if N<1000:
    print('ABC')
else:
    N=N-999
    print('ABD')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())

if N<=999:
  print("ABC"+str(N))
else:
  print("ABD"+str(N-1000+1))




N=int(input())

if N<=999:
  print("ABC"+str(N))
else:
  print("ABR"+str(N-1000+1))




N=int(input())

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




Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
if n<=999:
  print("ABC"+str(n))
else:
  print("ABD"+str(n-999))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x,y = map(int,input().split())
a=y-x
b=a*(a-1)/2
print(round(b-x))


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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())

s = input()

if n < 1000:
    print('ABC')

elif 1000 <= n <= 1998:
    print('ABD')

N = int(input())

s = input()

if N < 1000:
    print('ABC')

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

N = int(input())

s = input()

if N < 1000:
    print('ABC')

elif N > 999:
    print('ABD')

N = int(input())

if N < 1000:
    print('ABC')

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())

if n % 999 == 0:
    print(999)
else:
    print(n%999)

n = int(input())

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = input()

if len(N)<=3:
  print("ABC")
else:
  print("ABD)


N = input()

if len(N)<=3:
  print("ABC")
else:
  print("ABD")


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a,b=map(int,input().split())
n=b-a
summy=((n+1)*n)/2
print(int(summy-b))

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=input()
if n>=1000:
  print('ABD')
else:
  print('ABC')

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

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

N = int(input())

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

N = int(input())

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=int(input())
if s<1000:
    print('ABC'+str(s))
else:
    print('ABD'+str(s-999))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a,b = [int(i) for i in input().split()]

souwa = 0
n = b - a
for i in range(n):
    souwa += i
     
x = souwa - b
     
print(x)

    a,b = [int(i) for i in input().split()]
     
    souwa = 0
    n = b - a
    for i in range(n):
        souwa += i
         
    x = souwa - b
         
    print(x)

a, b  = [int(i) for i in input().split()]
     
souwa = 0
n = b - a
for i in range(n):
    souwa += i
     
x = souwa - b
     
print(x)

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a=int(input())
if a<10:
  print("ABC00"+str(a))
elif 10<=a<100:
  print("ABC0"+str(a))
elif 100<=a<1000:
  print("ABC"+str(a))
elif 1000<=a<1010:
  print("ABD00"+str(a-999))
elif 1010<=a<1100:
  print("ABD0"+str(a-999))
else:
  print("ABD"+str(a-999))

a=int(input())
if a<10:
  print("ABC00"+a)
elif 10<=a<100:
  print("ABC0"+a)
elif 100<=a<1000:
  print("ABC"+a)
elif: 1000<=a<1010:
  print("ABD00"+a)
elif: 1010<=a<1100:
  print("ABD0"+a)
else:
  print("ABD"+a)

a=int(input())
if a<10:
  print("ABC00"+str(a))
elif 10<=a<100:
  print("ABC0"+str(a))
elif 100<=a<1000:
  print("ABC"+str(a))
elif: 1000<=a<1010:
  print("ABD00"+str(a))
elif: 1010<=a<1100:
  print("ABD0"+str(a))
else:
  print("ABD"+str(a))

a=int(input())
if a<10:
  print("ABC00"+str(a))
elif 10<=a<100:
  print("ABC0"+str(a))
elif 100<=a<1000:
  print("ABC"+str(a))
elif 1000<=a<1010:
  print("ABD00"+str(a))
elif 1010<=a<1100:
  print("ABD0"+str(a))
else:
  print("ABD"+str(a))

a=int(input())
if a<1000:
  print("ABC")
else:
  print("ABD")

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = map(int, input().split())
print("ABC" if N<=999 else "ABD")

N = input()
print("ABC" if N<=999 else "ABD")

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = input()
if N <= 999:
  pirnt("ABC")
else:
  print("ABD")

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(inut())
if N <= 999:
  print('ABC')
else:
  print('ABD')

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
if n < 1000:
  print('ABC' + str(n))
else:
  print('ABD' + str(n-999))


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


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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

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

N = int(input())

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math
def dfs(cost, N):
    if N<6 :
        return cost+N
    else:
        ret0 = 6 ** math.floor(math.log(N, 6))
        ret1 = 9 ** math.floor(math.log(N, 9))
        if (ret0>1) and (ret1>1):
            return min(dfs(cost+1, N-ret0), dfs(cost+1, N-ret1))
        else:
            ret = max(ret0, ret1)
            return dfs(cost+1, N-ret)

N = int(input())
print(dfs(0, N))

def dfs(cost, N):
    if N<6 :
        return cost+N
    else:
        ret0 = 6 ** math.floor(math.log(N, 6))
        ret1 = 9 ** math.floor(math.log(N, 9))
        if (ret0>1) and (ret1>1):
            return min(dfs(cost+1, N-ret0), dfs(cost+1, N-ret1))
        else:
            ret = max(ret0, ret1)
            return dfs(cost+1, N-ret)

N = int(input())
print(dfs(0, N))

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())

if n>=1000:
  print("ABD"+str(n-999).zfill(3))
else:
  print("ABC"+str(n).zfill(3))

n = int(input())

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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])

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
rint('ABC' if int(input())<1000 else 'ABD')

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-

# input
N = int(input())

# solve
ans = 'ABC' + str(N).zfill(3) if N < 1000 else 'ABD' + str(N - 999).zfill(3)

# output
print(ans)


# -*- coding: utf-8 -*-

# input
N = int(input())

# solve
ans = 'ABC' if N < 1000 else 'ABD'

# output
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def f(n):
  if 1<=n<10:
    return "00"+str(n)
  elif n<100:
    return "0"+str(n)
  else:
    return str(n)
n=int(input())
if n<=999:
  print("ABC"+f(n))
else:
  print("ABD"+f(n-999))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())

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

print(ans)

n = int(input())

ans = 'ABC' if n <= 999 else 'ABD'

print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
print('ABC999')



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))


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))

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))


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))


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))


print("ABC" if len(input().rstrip()) <= 3 else "ABD")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
if N >= 1000:
  N += 1
  print('ABD' + str(N)[1:])
else:
  print('ABC' + str(N))


N = int(input())
if N >= 1000:
    N += 1
    print('ABD')
else:
    print('ABC')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
if(N<=999):
    print("ABC")
if(N>=1000&N<=1998):
    print("ABD")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
if 1<= N < 1000:
    print('ABC')


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

N=input()

if int(N) >= 1000:
    print('ABD')


else:
    print('ABC')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
if int(input())<999:
    print('ABC')
else:
    print('ABD')

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a=int(input())
if a < = 999:
  print('ABC')
 else:
  print('ABD')

# your code goes here
a=int(input())

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
if n < 1000:
  nn = '%03d' % n
  print('ABC'+str(nn))
else:
  nn = '%03d' % (n - 999)
  print('ABD'+str(nn))

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

Verdicts: Wrong Answer

Accepted