Problem:


Score : 100 points

Problem Statement

Decades have passed since the beginning of AtCoder Beginner Contest.

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

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

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

Constraints

1 \leq N \leq 1998

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

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

Sample Input 1

999

Sample Output 1

ABC

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

Sample Input 2

1000

Sample Output 2

ABD

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

Sample Input 3

1481

Sample Output 3

ABD

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



Sample input:
999


Sample output:
ABC

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())

if X < 1000:
  print('ABC' + f'{X:03}')
else:
  X = X % 999
  print('ABD' + f'{X:03}')

Submission status: Wrong Answer

Solution code:
X = int(input())

if X < 1000:
  print('ABC' + str(X).zfill(3))
else:
  X = X % 999
  print('ABD' + str(X).zfill(3))

Submission status: Wrong Answer

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


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

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









if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

N = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
contest_num = int(input())

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

elif contest_num < 1000:
    result_str = 'ABC'

elif contest_num >= 1000:
    result_str = 'ABD'

print("result_str")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

N = int(input())

if N < 1000:
    print('ABC')

if N >= 1001:
    print('ABD')

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if 999 >= N >= 100:
    print("ABC" + str(N))
if 99 >= N >= 10:
    print("ABC0" + str(N))
if 9 >= N >= 1:
    print("ABC00" + str(N))
if 1008 >= N >= 1000:
    M = N - 999
    print("ABD00" + str(M))
if 1098 >= N >= 1009:
    M = N - 999
    print("ABD0" + str(M))
if 1998 >= N >= 1099:
    M = N - 999
    print("ABD" + str(M))

Submission status: Wrong Answer

Solution code:
N = int(input())

if 999 >= N >= 100:
    print("ABC"  + str(N))
if 99 >= N >= 10:
    print("ABC0" + str(N))
if 9 >= N >= 1:
    print("ABC00" + str(N))
if 1008 >= N >= 1000:
    M = N - 999
    print("ABD00" + str(M))
if 1098 >= N >= 1009:
    M = N - 999
    print("ABD0" + str(M))
if 1998 >= N >= 1099:
    M = N - 999
    print("ABD" + str(M))

Submission status: Wrong Answer

Solution code:
N = int(input())

if 999 >= N >= 100:
    print("ABC"  + str(N))
if 99 >= N >= 10:
    print("ABC0" + str(N))
if 9 >= N >= 1:
    print("ABC00" + str(N))
if 1008 >= N >= 1000:
    M = N - 999
    print("ABD00" + str(M))
if 1098 >= N >= 1009:
    M = N - 999
    print("ABD00" + str(M))
if 1998 >= N >= 1099:
    M = N - 999
    print("ABD00" + str(M))

Submission status: Wrong Answer

Solution code:
N = input()

if N <= str(999):
    print('ABC')

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

Submission status: Wrong Answer

Solution code:
N = input()

if N >= str(999):
    print('ABC')

else:
    print('ABD')

Submission status: Wrong Answer

Solution code:
N = input()

if N <= str(999):
    print('ABC')

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
N=int(input())

if N < 1000:
    print('ABC')


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

Submission status: Wrong Answer

Solution code:
contest_num = int(input())

if contest_num >= 1999: # 不等号は=の手前に
    result_str = 'The contest has not been held'

elif contest_num < 1000:
    result_str = 'abc'

elif contest_num >= 1000:
    result_str = 'abd'

print(result_str)

Submission status: Wrong Answer

Solution code:
contest_num = int(input())

if contest_num >= 1999: # 不等号は=の手前に
    print('None')

elif contest_num < 1000:
    print('abc')

elif contest_num >= 1000:
    print('abd')

Submission status: Wrong Answer

Solution code:
contest_num = int(input())

if contest_num <= 999: # 不等号は=の手前に
    print('abc')

elif contest_num >= 1000:
    print('abd')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()

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

# strとintが混ざるとエラーになる
# "1000"にしたらエラーが取れた

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
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:
  a=str(n%1000+1)
  if len(a)==1:
    print("ABD00"+a)
  elif len(a)==2:
    print("ABD0"+a)
  else:
    print("ABD"+a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
contest_num = int(input())

if contest_num <= 999:
    print('ABC' + str(contest_num).zfill(3))
elif contest_num >= 1000:
    over_thousand_num_fix = contest_num - 999
    print('ABD' + str(over_thousand_num_fix).zfill(3))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n<10:
  print('ABC00' + str(n) )
elif n<100:
  print('ABC0' + str(n))
elif n<1000:
  print('ABC' + str(n))
else:
  print('ABD' + str(n+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

print("ABC{:03}".format(N)) if N//1000!=1 else print("ABD{:03}".format(N%1000 + N//1000))

Submission status: Wrong Answer

Solution code:
N = int(input())

print("ABD{:04}".format(N)) if N//1000!=1 else print("ABD{:04}".format(N%1000 + N//1000))

Submission status: Wrong Answer

Solution code:
N = int(input())

num = N%1000 + N//1000

print("ABD"+str(num))

Submission status: Wrong Answer

Solution code:
N = input()

print("ABD"+N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N <= 999:
    print('ABC' + str(N+1000)[1:])
else:
    print('ABD' + str(N+1)[1:])

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
if n > 999:
  print(f'ABC{n}')
else:
  print(f'ABD{n-999}')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
if a < 1000:
    print('ABC'+(str(a)))
elif len(str(a-999)) == 2:
    print('ABD'+'0'+(str(a-999)))
elif len(str(a-999)) == 1:
    print('ABD'+'00'+(str(a-999)))
else:
    print('ABD'+(str(a-999)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N >= 1000:
  N += 1
  print('ABD' + str(N)[1:])
else:
  print('ABC' + str(N))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n = I()
if n >= 1000:
    ans = 'ABD'
    if len(str(n - 999)) == 1:
        ans += '00' + str(n - 999)
    elif len(str(n - 999)) == 2:
        ans += '0' + str(n - 999)
    else:
        ans += str(n - 999)

else:
    ans = 'ABC'
    if len(str(n)) == 1:
        ans += '00' + str(n)
    elif len(str(n)) == 2:
        ans += '0' + str(n)
    else:
        ans += str(n)
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n = I()
if n >= 1000:
    ans = 'ABD'
    if len(str(n - 999)) == 1:
        ans += '00' + str(n - 999)
    elif len(str(n - 999)) == 2:
        ans += '0' + str(n - 999)
    else:
        ans += str(n - 999)

else:
    ans = 'ABC'
    if len(str(n)) == 1:
        ans += '00' + str(n)
    elif len(str(n)) == 2:
        ans += '0' + str(n)
    else:
        ans += str(n)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n = I()
if n >= 1000:
    print('ABD' + str(n - 999))
else:
    print('ABC' + str(n))

Submission status: Wrong Answer

Solution code:
a=int(input())
if a >= 1000:
  print("ABD",a%1000+1)
else:
  print("ABC",a)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 'AB'
if n <= 999:
  ans += 'C'
else:
  ans += 'D'
  n -= 999
print(ans+'{:03}'.format(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
print('ABC') if n > 0 and n < 100 else print('ABD')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N > 999:
    number = N-999
    print('ABD'+str(number).zfill(3))
else:
    print('ABC'+str(N).zfill(3))

Submission status: Wrong Answer

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

print(N)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 1000:
    print('abc')
else:
    print('abd')

Submission status: Wrong Answer

Solution code:
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left #bisect_left(list, value)
#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')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 1000:
  s = "ABC"
else:
  s = "ABD"
  N -= 999
  
n = ""
if N < 10:
  n = "00"
elif N < 100:
  n = "0"

print(s + n + str(N))

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 1000: print("ABC" + str(N))
else: print("ABD" + str(N)[1:3] + str((N + 1) % 10))

Submission status: Wrong Answer

Solution code:
N = input()

cnt = len(str(N))

if cnt <= 3:
    print("ABC" + N)
else:
    print("ABD" + N[cnt-3:])

Submission status: Wrong Answer

Solution code:
N = input()
cnt = len(str(N))

print("ABD" + N[cnt-3:])

Submission status: Wrong Answer

Solution code:
import itertools
def main():
  n = int(input())
  print(("ABC"+'{:03}'.format(n))if n<=999 else "ABD"+'{:03}'.format(n-999))
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if a[0] >999:
        print("ABD"+str(a[0]-999))
    else:
        print("ABC"+str(a[0]))

Submission status: Wrong Answer

Solution code:
a = int(input())
if a >= 1000:
  print(a-999)
else:
  print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
print(("ABD{}" if N//1000 else "ABC{}").format(((N-1)%999)+1))

Submission status: Wrong Answer

Solution code:
print(((int(input())-1)%999)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=input()
if int(n)<1000:
  ans="ABC"+n
else:
  ans="ABD"+n[1:]
print(ans)

Submission status: Wrong Answer

Solution code:
#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]))

Submission status: Wrong Answer

Solution code:
#pypyは内包表記使わない, rstrip注意
#提出前に見返すこと！
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate
    #from itertools import product
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 1000000007

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
print('abd') if int(input()) >= 1000 else print('abc')

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
# import bisect
# from collections import Counter, defaultdict, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    n = int(input())
    if n < 1000:
        print("ABC"+str(n).zfill(3))
    else:
        n -= 999
        print("ABD"+str(n).zfill(3))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 1000:
    tmp = str(N)
    print("ABC"+tmp.zfill(3))
else:
    tmp = str(N%1000+1)
    print("ABD"+tmp.zfill(3))

Submission status: Wrong Answer

Solution code:
N = int(input())
tmp = str(N)
if N < 1000:
    print("ABC"+tmp.zfill(3))
else:
    print("ABD"+tmp.zfill(4))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = raw_input()
if x < 1000:
    print "ABC"
if x > 999:
    print "ABD"

Submission status: Wrong Answer

Solution code:
n=input()
if n<999: 
  print "ABC" 
elif n < 1998:
  print "ABD"

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda x: [ns() for _ in range(x)]
nas = lambda: stdin.readline().split()

n = ni()

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 1000:
    print('ABC' + str(N // 100) + str(N // 10)[-1] + str(N // 1)[-1])
else:
    print('ABD' + str((N - 999) // 100) + str((N - 999) // 10)[-1] + str((N - 999) // 1)[-1])

Submission status: Wrong Answer

Solution code:
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from functools import *
from itertools import permutations,combinations,groupby
import sys
import bisect
import string
import math
import time
import random
def Golf():
    *a,=map(int,open(0))
def S_():
    return input()
def IS():
    return input().split()
def LS():
    return [i for i in input().split()]
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def NI(n):
    return [int(input()) for i in range(n)]
def NI_(n):
    return [int(input())-1 for i in range(n)]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def LtoS(ls):
    return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0}):
#h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0}) # sample usage
    mp=[1]*(w+2)
    found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[1]+[mp_def[j] for j in s]+[1]
    mp+=[1]*(w+2)
    return h+2,w+2,mp,found
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)]
        rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['YES','NO']

mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()
#sys.setrecursionlimit(10**7)
input=lambda: sys.stdin.readline().rstrip()
 
def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True

ans=0

n=I()

if n<=999:
    ans='ABC'+str(n+1000)[1:]
else:
    ans='ABD'+str(1000+n-999)[1:]

print(ans)

Submission status: Wrong Answer

Solution code:
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])

Submission status: Wrong Answer

Solution code:
INF = 10 ** 20
 
N = int(input())
coin_list = [1] + [6**i for i in range(1, 7)] + [9**i for i in range(1, 6)]
dp = [INF]*(N+1)
dp[0] = 0
 
for i in range(1,N+1):
	for coin in coin_list:
    		if i-coin >= 0: dp[i] = min(dp[i], dp[i-coin]+1)
 
print(dp[N])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N <= 999:
    s = 'ABC' + str(N).zfill(3)
else:
    s = 'ABD' + str(N-999).zfill(3)

print(s)

Submission status: Wrong Answer

Solution code:
print("AB" + "C" if int(input()) <= 999 else "D")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


n = int(sys.stdin.buffer.readline())
if n <= 999:
    print('ABC{:03d}'.format(n))
else:
    print('ABD{:03d}'.format(n - 999))

Submission status: Wrong Answer

Solution code:
n = int(input())
l9 = [9**i for i in range(0,6)]
l6 = [6**i for i in range(0,6)]
l = sorted(l9+l6,reverse=True)

i = 0
ans = 0
while(n>0):
  if n - l[i] < 0:
    i += 1
    n = n
  else:
    ans+=1
    #print(n,"-",l[i],"=",n-l[i],"ans=",ans)
    n = n - l[i]
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 1000:
    print('ABC'+str(N))
else:
    print('ABD'+str(N+1)[1:])