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


a = int(input())

if a <= 99:
    print("ABC")
else:
    print("ABD")



a = int(input())

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

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

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



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")
    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 = input()
N=int(N)
if N>=1,N<=999:
    print('ABC')
if N>=1000,N<=1998:
    print('ABD')

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

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

N = input()
N=int(N)
if N>=1 and N<=999:
    print('ABC')
if N>=1000 and 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 1 <= n <= 999:
  print(ABC)
else:
  print(ABD)

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

n = int(input())
if 1 <= n <= 999:
  print(n)
else:
  print(n-999)

n = input()
if 1 <= n <= 999:
  print(n)
else:
  print(n-999)

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

Verdicts: Runtime Error

Runtime Error

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

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

a=int(input())

if a>= 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())
S = 'ABD' if N >= 1000 else 'ABC'
print(S+str(N%1000+N//1000))

N = int(input())
S = 'ABD' if N >= 1000 else 'ABC'
print(S)

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

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') if n > 0 and n < 100 else print('ABD')

n = int(input())
print('ABC') if n > 0 and n < 1000 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("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):
#99a
N = int(input())
if N >= 1100:
    ans = ["ABD",N-1000+1]
elif 1100 > N >= 1010:
    ans = ["ABD0",N-1000+1]
elif 1010 > N >= 1000:
    ans = ["ABD00",N-1000+1]
elif 1000 > N >= 100:
    ans = ["ABC",N]
elif 100 > N >= 10:
    ans = ["ABC0",N]
elif 10 > N >= 1:
    ans = ["ABC00",N]

print(''.join(map(str, ans)))

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

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()

dp = [99999999] * (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])

import sys
if __name__ == "__main__":
    N = int(input())
    buf = (N-1) // 999
    if N == 1 or buf == 0:
        print('ABC')
        sys.exit()
    elif buf == 1:
        print('ABD')
        sys.exit()
    else:
        print('ABE')
        sys.exit()

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

sa = b - a
east = (1 + sa) * sa / 2
snow = int(east - b)
print(snow)

N = int(input())

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

if N > 999:
	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()

cnt = len(str(N))

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





N = input()
cnt = len(str(N))

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

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 < 1000:
    print('ABC' + '{0:03d}'.format(N))
else:
    print('ABD' + '{0:03d}'.format(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):
N = int(input())

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

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):
print(['ABD', 'ABC'][int(input())//1000])

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

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

if number > 0 and number < 1000:
    print("ABC")

if number >= 1000 and number <= 1998:
    print("ABD")

number = int(input())

if number > 0 and number < 1000:
    print("ABC")

if number >= 1000 and number <= 1998:
    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 len(n)==4:
  print("ABD"+str(int(n)-999).zfill(3))
else:
  print("ABC"+n.zfill(3))

n=input()
if len(n)==4:
  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{:03d}'.format(n))
else:
    print('ABD{:03d}'.format(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())

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

N=int(input())

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

if N<1000:
    print(“ABC”)
else:
    print(“ABD”)

N=int(input())

if N<1000:
    print(“ABC”)
else:
    print(“ABD”)

N=int(input())
if N<1000:
    print("ABC")
else:
    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):
N = map(int(input().split()))
if N < 1000:
    print("ABC")
else:
    print("ABD")



N = map(int,input().split())

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

else:
  print("ABC")

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):
n = int(input())
res = ""

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

n = int(input())
res = ""

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

print(res)

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 = input().split(' ')

c = int(b) - int(a)

print(int(a) - (c - 1))


n = input()

if int(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())
a=n//999
if a==0:
    print("ABC")
else:
    print("ABD")


n=int(input())
a=n//1000
if a==0:
    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 =map(int,input().split())
s = b-a
s = int(s*(s+1)/2-b)
print(s)

num = input('>> ')
num = int(num)
if num <= 999 and num >= 0 :
    print('ABC')
elif num >= 1000 and num <= 1998 :
    print('ABD')
else:
    print('条件が違います')

n,c = [int(i) for i in input().split()]
d = [] 
for i in range(c):
    d.append(list(map(int, input().split())))
color = []
for i in range(n):
    color.append(list(map(int, input().split())))
for i in range(n):
    for j in range(n):
        color[i][j] -= 1
dofc = [[0 for i in range(3)] for j in range(c)]
for t in range(3):
    for a in range(c):
        for l in range(n):
            for row in range(n):
                dofc[a][(l+row)%3] += d[a][color[row][l]]
D = dofc[0][0]+dofc[1][1]+dofc[2][2]
for c0 in range (c):
    for c1 in range (c):
        if c1 == c0:
            continue
        for c2 in range (c):
            if c2 == c1 or c2 == c0:
                continue
            D = min(D,dofc[c0][0]+dofc[c1][1]+dofc[c2][2])
print(D)

num = input('>> ')
num = int(num)
if num <= 999 and num >= 0 :
    print('abc')
elif num >= 1000 and num <= 1998 :
    print('abd')
else:
    print('条件が違います')

num = input()
num = int(num)
if num <= 999 and num >= 0 :
    print('ABC')
elif num >= 1000 and num <= 1998 :
    print('ABD')

Verdicts: Runtime Error

Wrong Answer

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):
x=int(input())
if x<1000:
  print("ABC"+str(x))
else:print("ABD"+str(x-999).zfill(3))

x=int(input())
if x<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,b=map(int,input().split())
n=0
for i in range(1,a-b+1):
  n+=i
print(n-b)


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

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



a,b = [int(i) for i in input().split(' ')]
n=b-a#13-8=5
N=n-1#5-1=4
x=(1/2*N)*(N+1)#2*5=10
y= x - a#10-8=2
print(int(y))

a = int(input())
if a>=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):
a=map(int,input().split())
print("ABD" if a<1000 else "ABC")

a=map(int,input().split())
print("ABC" if a<1000 else "ABD")

a=int(input())
print("ABC" if a<1000 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):
c = 0
a,b = map(int,input())
for i in range(1,a-b):
    c = c + i
print(a-c)


c = 0
A = input()
B = A.split(" ")
a,b = int(B[0]),int(B[1])
for i in range(1,a-b):
    c = c + i
print(c - a)


i = int(input())
if i <= 999:
    print("ABC")
else:
    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):
n = int(input())
if n > 999:
    num = n-999
    print('ABD{:03}'.format(num))

else:
    print('ABC{:03}'.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<=999:
  print("ABD")
else:
  print("ABD")



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):
a, b = map(int, input().split())
dif = b - a
sum = int(dif / 2 * (1 + dif))
print(sum - b)

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):
a,b = map(int,input().split())
cnt = 0
for i in range(b-a):
  cnt += i
print(cnt-a)

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

n = str(input())
print('ABC') if int(n) < 1000 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=map(int,input().split())
C = (B - A )*( B - A + 1 )/ 2 - B 
print(C)

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

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" if n<999 else "ABD")

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):
print(["ABD","ABC"][int(input())>999])

print("AB"+"CD"[int(input())>999])

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

a=input()
a=int(a)
b=input()
b=int(b)


sum=0
for x in range(b-a+1):
    sum+=x
    
high=sum-b

print(high)

n=input()
n=int(n)
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())
ans=n
for i in range(n):
  cc=0
  t=i
  while t>0:
    cc=cc+t%6
    t=t//6
  t=n-i
  while t>0:
    cc=cc+t%9
    t=t//9
  if ans>cc:
    ans=cc
print(ans)

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("ABD" int(input())>999 else "ABC")

print("ABD" if int(input())>999 else "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')
else:
    print('ABD')

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):
a, b = map(int, input().split())

x = b - a
s = 0
for i in range(1,x,1):
  s += i

ans = s - a
print(ans)

N=int(input())
if N<1000:
    ans="ABC"
else:
    ans="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("ABC"+str(n) if n<1000 else "ABD"+str(n-999))

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

n = int(input())

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

n = int(input())

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

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)
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("ABD"+str(N-1000))
else:
  print("ABC"+str(N))

N = int(input())
 
if N >= 1000:
  print("ABD"+str(N-1000).zfill(3))
else:
  print("ABC"+str(N).zfill(3))

N = int(input())

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

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

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):
def main():
    n = int(input())
    dp = [float('inf')]*(n+1)
    dp[0] = 0

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

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

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

main()


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<1000:
    print('ABC'+str(N))
else:
    print('ABD'+str(((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):
n=int(input())
k=n-999
if n<=999:print('ABC'+str(n.fill(3)))
else:print('ABD'+ str(k.zfill(3)))


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

n=int(input())
if n<=999:print('ABC')
else: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):
a,b = map(int,input().split())
t = b - a
n = [1]
x = 1

for i in range(2,999):
  x = i + x
  n.append(x)

else:
  for j in range(0,len(n)):
    if n[j+1] - n[j] == t:
      break
print(n[j] - a)
    

x = int(input())

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

Verdicts: Runtime Error

Accepted