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())
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())
print("ABC"+str(N) if N<1000 else "ABD"+str(N-999).zfill(3))

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())
if N < 999:
    print("ABC")
elif N <= 1998:
    print("ABD")


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())
if n<1000:
    print('ABD')
else:
    print('ABC')

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())
if n<=999:
  print('ABC'+'{0:03d}'.format(n))
else:
  n=n-999
  print('ABD'+{0:03d}'.format(n))

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


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

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

Verdicts: Runtime Error

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):
a = int(input())
if a < 1000:
    print('abc')
else:
    print('abd')

def L(N):
    def cal(n: int, h: int):
        f = 0
        while True:
            f += 1
            m = n - pow(h, f)
            if m <= 0:
                break
            n = m
        return n, f - 1

    rem, count_1 = cal(N, 9)
    if rem == 0:
        return count_1
    rem, count_2 = cal(rem, 6)
    if rem == 0:
        return count_1 + count_2
    return count_1 + count_2 + rem

print(L(int(input())))

a = int(input())
if a < 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 N<1000:
  print('ABC' + N.zfill(3))
  exit()
print('ABD' + (N-999).zfill(3))

  

N = int(input())
if N<1000:
  print('ABC' + str(N).zfill(3))
  exit()
print('ABD' + str(N-999).zfill(3))


N = int(input())
if N<1000:
  print('ABC' + str(N).zfill(3))
  exit()
print('ABD' + str(N-999).zfill(3))

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


Verdicts: Runtime Error

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")
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):
print("AB"+["c","D"][len(input())>3])

print("AB"+["C","D"][len(input())>3])

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 == 0:
	print("ABC")
else: 
	print("ABD")

n = int(input())

if n / 1000 < 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

N = int(input())
# A = [int(x) for x in input().split()]


C = [1]
for i in range(math.ceil(math.log(N,9)) + 3):
    if i !=0 :
        C.append(9 ** i)
for i in range(math.ceil(math.log(N,6)) + 3):
    if i != 0:
        C.append(6 ** i)


INF = 10**10
dp = [INF] * (N+1)
dp[0] = 0

for i in range(1,N+1):
    for c in C:
        if i - c >= 0:
            dp[i] = min(dp[i], dp[i - c] + 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):
a=input()
if a<=999:
    print("ABC")
else:
    print("ABD")

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())
s = 'D' if n > 1000 else 'C'
print('AB' + s + str(n % 1000)) 



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

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

s = print('AB' + ('D' if int(input()) > 999 else 'C'))

Verdicts: Wrong Answer

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):
# -*- coding: utf-8 -*-

n = int(input())

if (n / 1000) == 0:
    print('ABC' + n % 1000)
else:
    print('ABD' + (n % 1000) + 1)

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

n = int(input())

if (n // 1000) == 0:
    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{:03d}'.format(n))
else:
    print('ABD{:03d}'.format(n - 1000 + 1))


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):
print("AB"+["C","D"][len(input()<4)])


print("AB"+["C","D"][len(input())<4])

print("AB"+["D","C"][len(input())<4])

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):
a=int(input())
if a<=999:
  print("ABC"+str(a))
elif 1000<=a<=1008:
  print("ABD00"+str(a-999))
elif 1009<=a<=1098:
  print("ABD0"+str(a-999))
else:
  print("ABD"+str(a-999))
  


a=int(input())

if a<=9:
  print("ABC00"+str(a))
elif 10<=a<=99:
  print("ABC0"+str(a))
elif 100<=a<=999:
  print("ABC"+str(a))
elif 1000<=a<=1008:
  print("ABD00"+str(a-999))
elif 1009<=a<=1098:
  print("ABD0"+str(a-999))
else:
  print("ABD"+str(a-999))
  


a=int(input())
if a<=999:
  print("ABC"+str(a))
elif 1000<=a<=1008:
  print("ABC00"+str(a-999))
elif 1009<=a<=1098:
  print("ABC0"+str(a-999))
else:
  print("ABC"+str(a-999))
  

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

Verdicts: 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):
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left 
#from fractions import gcd
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

N = int(input())

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




import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left 
#from fractions import gcd
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

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())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))

n1 = input()
n = int(n1)+1

if n<=1000:
    print("ABC"+n1)
else:
    print("ABD"+str(n))

#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))

n1 = input()
n = int(n1)+1

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())
if n < 1000:
	print("ABC",n)
else:
	print("ABD",n-999)

n = int(input())
if n < 1000:
	print("ABC"+str(n))
else:
	print("ABD"+str(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):
def summation(n):
    if n == 0:
        return 0
    elif n == 1:
        return 1
    else:
        return n + summation(n-1)


def main():
    a,b = map(int, input().split())
    
    n_plus1 = b-a
    
    ans = summation(n_plus1) - b
    
    print(ans)

    
if __name__ == "__main__":
    main()

N = int(input())
if N < 1000:
    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{:03}'.format(N))
else:
  print('ABD{:03}'.format(str(N)[1:]))


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

N = int(input())
print('ABC' if N < 1000 else '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):
N = int(input())
if N<1000:
    if len(str(N))==1:
        print("ABC"+"00"+str(N))
    elif len(str(N))==2:
        print("ABC"+"0"+str(N))
    elif len(str(N))==3:
        print("ABC"+str(N))
else:
    N = N-999
    if len(str(N))==1:
        print("ABD"+"00"+str(N))
    elif len(str(N))==2:
        print("ABD"+"0"+str(N))
    elif len(str(N))==3:
        print("ABD"+str(N))

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 = map(int, 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())

block = (N-1) // 999

a = chr(ord( "C") + block)
N2 = N - block * 999

if N2 < 10:
 c = "00"
elif N2 < 100:
 c = "0"
else:
 c = ""
 

b = "AB" + a + c + str(N2)

print("{}".format(b))

N = int(input())

block = (N-1) // 999

a = chr(ord( "C") + block)
N2 = N - block * 999

b = "AB" + a + str(N2)

print("{}".format(b))

N = int(input())
print("{}".format("AB" + chr(ord( "C") + (N-1) // 999)))

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 >= 1000:
  print('ABD'+(n-999))
else:
  print('ABC'+n)

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

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

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):
print('ABC' if int(intput()) < 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):
contest =[int(a) for a in input()]
contest1 = contest[0]

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

contest = int(input())

if contest <= 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 < 1999:
	print('ABD')
else:
	print('ABC')

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

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

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(intput())
if (n < 1000)
	print("ABC")
else
	print("ABD")


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


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


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

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


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


Verdicts: Runtime Error

Runtime Error

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):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    if n < 1000:
        print("ABC{:03}".format(n))
    else:
        print("ABD{:03}".format(n - 999))


if __name__ == "__main__":
    main()


import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()


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>=1 and N<1000:
    print(ABC)
else:
    print(ABD)


N = int(input())
if N>=1 and N<1000:
    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 = input()

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





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

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

N = int(input())
 
if N <= 999:
  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-999)) == 1:
    print('ABD00' + str(N-999))
  elif len(str(N-999)) == 2:
    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

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)]
line1 = [0]*C
line2 = [0]*C
line0 = [0]*C
for i in range(N):
  c = list(map(int, input().split()))
  for j in range(N):
    if (i+j)%3 == 0:
      line0[c[j]-1] +=+1
    if (i+j)%3 == 1:
      line1[c[j]-1] +=+1
    if (i+j)%3 == 2:
      line2[c[j]-1] +=+1
ans = float("inf")

#print(line0,line1,line2)
for i in range(C):
  for j in range(C):
    if j !=i :
      for k in range(C):
        if k !=i and k!=j: 
#          print(i,j,k)
          curr = 0
          for l in range(C):
            curr += line0[l]*D[l][i]
            curr += line1[l]*D[l][j]
            curr += line2[l]*D[l][k]
#          print(curr)
          ans = min(ans, curr)
print(ans)

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())
a = [1,]
b = []
i = 6
while i < N:
    b.append(i)
    i *= 6
c = []
i = 9
while i < N:
    c.append(i)
    i *= 9
L = sorted(a + b + c)
x = 0
i = 1
while N > 0:
    if N >= L[-i]:
        N -= L[-i]
        x += 1
    else:
        i += 1
print(x)


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('{}{:0=3}'.format('ABC',n))
else:
  print('{}{:0=3}'.format('ABD',n-999))

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):
s = int(input())

if s > 999:
  print('ABD{:03d}'.format(s-999))
else:
  print('ABC{:03d}'.format(s))

s = int(input())
 
if s > 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("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):
n_max = 100000

bs = [(6 ** i, 6) for i in range (1, 10)]
bs.extend([(9 ** i, 9) for i in range (1, 10)])
bs = list(sorted(filter(lambda x: x[0] <= n_max, bs)))
bms = []
s = 5
for b, i in bs:
    s += b * (i - 1)
    bms.append((b, i, s))

#print(bs)


#m = 44852
m = int(input())

stack = [(m, 0, len(bms) - 1)]

result = 10000
while stack:
    m, n, bms_i = stack.pop()
    b, i, s = bms[bms_i]
    #print(m, n, bms_i, b, i, s)

    if n > result:
#        print("skip!", m, n, bms_i)
        continue
    if bms_i < 0:
        if m < 6 and result > m + n:
            result = m + n
#            print('get result!', result)
        continue

    for j in range(0, i):
        next_m = m - b * j
        if next_m > 0 and n + j < result:
            stack.append((next_m, n + j, bms_i - 1))

print(result)


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())
if N > 999:
    print('ABC')
else:
    print('ABD')

#!/usr/bin/env python3
from itertools import product, permutations, combinations

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):
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 <= 999:
  answer = "ABC"+str(n).zfill(3)
else:
  answer = "ABD"+str(n-999).zfill(3)
print(answer)
  


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


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 -*-
import sys

def main(argv):
  i = int(argv[0])
  if i >= 0 and 999 >= i:
    print('ABC')
  elif i > 999:
    print('ABD')
    
if __name__ == '__main__':
  main(sys.argv[1:])

# -*- coding: utf-8 -*-
import sys

def main(argv):
  i = int(argv[0])
  if i => 0 and 999 <= i:
    print('ABC')
  elif i > 999:
    print('ABD')
if __name__ == '__main__':
  main(sys.argv[1:])

# -*- coding: utf-8 -*-
import sys
    
if __name__ == '__main__':
  i = int(input())
  if i >= 0 and 999 >= i:
    print('ABC')
  elif i > 999:
    print('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):
input_data = input()
if input_data <= 999:
    print(str(ABC))
else:
    print(str(ABD))

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

input_data = input()
if input_data <= 999:
    print(ABC)
else:
    print(ABD)

input_data = input()
if input_data <= 999:
    print('ABC')
print('ABD')

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

Verdicts: Runtime Error

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):
s = int(input())

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

s = int(input())

if s > 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):
k=int(input())
if k<999:
    print("ABC")
else:
    print("ABD")

k=int(input())
if k<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())
if N < 1000:
    print('ABC'+str(N))
else:
    print('ABD'+str(N+1)[1:])

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):
print(format(0xABC000 + int(input(), 16), 'x').upper())

print(format(0xABC000 + int(input(), 16), 'x').upper()[:3])

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('ACB')
else:
    print('ADB')


n = int(input())

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

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):
#abc099 a
n=int(input())
ans=""
if n>=1000:
    ans="ABD"
    n-=999
else:
    ans="ABC"
s=[0]*3
s[0]=n//100
s[1]=(n//10)%10
s[2]=n%10
print(ans+str(s[0])+str(s[1])+str(s[2]))


#abc099 a
n=int(input())
ans=""
if n>=1000:
    ans="ABD"
    n-=999
else:
    ans="ABC"
s=[0]*3
s[0]=n//100
s[1]=(n//10)%10
s[2]=n%10
print(ans+str(s[0])+str(s[1])+str(s[2]))


#abc099 a
n=int(input())
if n>=1000:
    print("ABD")
else:
    print("ABC")


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


#coding:utf-8

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):
i=input()
if i<1000:
  print('ABC')
else:
  print('ABD')

i=int(input())
if i<1000:
  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())
a='ABD'
b=str(N+1)
print(a+b)

N=int(input())
a='ABD'
b='ABC'
c=str(N+1)
d=str(N)
if N<=999:
  print(b+d)
else:
  print(a+c)

N=int(input())
a='ABD'
b=N+1
print(a+b)

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

N=int(input())
a='ABD'
b='ABC'
c=str(N-999)
d=str(N)
if N<=999:
  print(b+d)
else:
  print(a+c)

N=int(input())
a='ABD'
b='ABC'

if N<=999:
  print(b)
else:
  print(a)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted