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

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

contest_num = int(input())

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Decades have passed since the beginning of AtCoder Beginner Contest.  The contests are labeled as `ABC001`, `ABC002`, ... from the first round, but after the 999-th round `ABC999`, a problem occurred: how the future rounds should be labeled?  In the end, the labels for the rounds from the 1000-th to the 1998-th are decided: `ABD001`, `ABD002`, ..., `ABD999`.  You are given an integer N between 1 and 1998 (inclusive). Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

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


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

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):
x=int(input())
a=x//999
b=x%999+1000
B=str(b)
C=B[1:]
if a==0:
  print("ABC"+C)
else:
  print("ABD"+C)


x=int(input())
a=x//999
if a==0:
  print("ABC")
else:
  print("ABD")


x=int(input())
a=x//999
b=x%999+1000
B=text(b)
C=B[1:]
if a==0:
  print("ABC"+C)
else:
  print("ABD"+C)


x=int(input())
a=x//1000
if a==0:
  print("ABC")
else:
  print("ABD")


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

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

N = input()

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

N = input()

if len(N) < 4:
    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 = 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())
L1 = [1]
L2 = [6**i for i in range(1,10) if 6**i < 100000]
L3 = [9**i for i in range(1,10) if 9**i < 100000]
L = L1 + L2 + L3
L.sort(reverse = True)
def paypay(N):
        if N < 6:
                return N
        else:
                ans = 0
                while N > 0:
                      for i in L:
                            if N >= i:
                                  N = N - i
                                  ans += 1
                                  break
        return ans


print(min(paypay(N),paypay(N-6)+1,paypay(N-9)+1) if N > 6 else N)

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

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()
num=int(N[3:])

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

N = input()
num = int(N)
if num < 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 <= 999):
  if (N <= 9):
    print('ABC00'+str(N))
  elif (10 <= N <= 99):
    print('ABC0'+str(N))
  else:
    print('ABC'+str(N))
else:
  if (N-999 <= 9):
    print('ABD00'+str(N-999))
  elif(10 <= N-999 <= 99):
    print('ABD0'+str(N-999))
  else:
    print('ABD'+str(N-999))

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

Verdicts: Wrong Answer

Accepted
Problem: Decades have passed since the beginning of AtCoder Beginner Contest.  The contests are labeled as `ABC001`, `ABC002`, ... from the first round, but after the 999-th round `ABC999`, a problem occurred: how the future rounds should be labeled?  In the end, the labels for the rounds from the 1000-th to the 1998-th are decided: `ABD001`, `ABD002`, ..., `ABD999`.  You are given an integer N between 1 and 1998 (inclusive). Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

Submission attempts (in order):
n = int(input().split())
if n < 1000:
  print('ABC')
else:
  print('ABD')

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

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

if N >= str(1000):
    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,b = [int(i) for i in input().split()]
n = b-a-1
print(n*(n+1)/2-a)

a,b = [int(i) for i in input().split()]
n = b-a-1
print(int(n*(n+1)/2-a))

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



	
	

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

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

Verdicts: Wrong Answer

Accepted
Problem: Decades have passed since the beginning of AtCoder Beginner Contest.  The contests are labeled as `ABC001`, `ABC002`, ... from the first round, but after the 999-th round `ABC999`, a problem occurred: how the future rounds should be labeled?  In the end, the labels for the rounds from the 1000-th to the 1998-th are decided: `ABD001`, `ABD002`, ..., `ABD999`.  You are given an integer N between 1 and 1998 (inclusive). Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

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

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

num = int(line)

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

line = input()

num = int(line)

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

line = input()

num = int(line)

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


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Decades have passed since the beginning of AtCoder Beginner Contest.  The contests are labeled as `ABC001`, `ABC002`, ... from the first round, but after the 999-th round `ABC999`, a problem occurred: how the future rounds should be labeled?  In the end, the labels for the rounds from the 1000-th to the 1998-th are decided: `ABD001`, `ABD002`, ..., `ABD999`.  You are given an integer N between 1 and 1998 (inclusive). Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

Submission attempts (in order):
import numpy as np
a, b = input().split(" ")
a = int(a)
b = int(b)

c = b - a
s = sum(list(np.arange(c)))
print(s - a)



a = input()
a = int(a)

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

n = int(input())

pref = ""
if n <= 999:
    pref = "ABC"
else:
    pref = "ABD"
    n = n - 999

print(pref + str(n).zfill(3))


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

n = int(input())

pref = ""
if n <= 999:
    pref = "ABC"
else:
    pref = "ABD"

print(pref)


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

n = int(input())
if 0 < 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())
k=b-a
print(((1+k)*k)//2-b)


N = int(input())
if N<1000:
    print("ABC")
elif N>=1000:
    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())
isD = False
if 1000 <= a:
    a = a % 1000 + 1
    isD = True
print("{}{}".format("ABD"if isD else "ABC", a))

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

print('ABC' if int(input()) <= 999 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())

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


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

D = [[0 for i in range(C)] for j in range(C)]
c = [[0 for i in range(N)] for j in range(N)]
# iwakan = [[[0 for i in range(N)] for j in range(N)] for k in range(C)]

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

for i in range(N):
    c[i] = list(map(int, input().split()))



#     for j in range(N):
#         for k in range(N):




# t1 = time.time()


numOfColors = [[0 for i in range(C)] for j in range(3)]
for i in range(N):
    for j in range(N):
        if (i + j) % 3 == 0:
            numOfColors[0][c[i][j] - 1] = numOfColors[0][c[i][j] - 1] + 1
        if (i + j) % 3 == 1:
            numOfColors[1][c[i][j] - 1] = numOfColors[1][c[i][j] - 1] + 1
        if (i + j) % 3 == 2:
            numOfColors[2][c[i][j] - 1] = numOfColors[2][c[i][j] - 1] + 1

iwakan = [[0 for i in range(C)] for j in range(3)]
for i in range(3):
    for j in range(C):
        for a in range(C):
            iwakan[i][j] = iwakan[i][j] + numOfColors[i][a] * D[a][j]

# t2 = time.time()

sum_min = float("inf")
for i in range(C):
    for j in range(C):
        for k in range(C):
            if (i == j) or (j == k) or (k == i):
                pass
            else:
                sum_tmp = iwakan[0][i] + iwakan[1][j] + iwakan[2][k]
                if sum_min > sum_tmp:
                    sum_min = sum_tmp

# t3 = time.time()

print(sum_min)

# elapsed_time1 = t2 - t1
# elapsed_time2 = t3 - t2
# print(f'time1: {elapsed_time1}')
# print(f'time2: {elapsed_time2}')


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

a = int(input())
if a-1000 >= 0:
  print("ABD")
else:
  print("ABC")

Verdicts: Runtime Error

Accepted
Problem: Decades have passed since the beginning of AtCoder Beginner Contest.  The contests are labeled as `ABC001`, `ABC002`, ... from the first round, but after the 999-th round `ABC999`, a problem occurred: how the future rounds should be labeled?  In the end, the labels for the rounds from the 1000-th to the 1998-th are decided: `ABD001`, `ABD002`, ..., `ABD999`.  You are given an integer N between 1 and 1998 (inclusive). Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

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

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

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Decades have passed since the beginning of AtCoder Beginner Contest.  The contests are labeled as `ABC001`, `ABC002`, ... from the first round, but after the 999-th round `ABC999`, a problem occurred: how the future rounds should be labeled?  In the end, the labels for the rounds from the 1000-th to the 1998-th are decided: `ABD001`, `ABD002`, ..., `ABD999`.  You are given an integer N between 1 and 1998 (inclusive). Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

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

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

# A - ABD

# A_ABD.py

N = int(input())

C_or_D = (N-1) // 999


name = ""

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

name += str(n)

print(name)



# A - ABD

# A_ABD.py

N = int(input())

C_or_D = (N-1) // 999


name = ""

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

name += str(n)

print(name)



# A - ABD

# A_ABD.py

N = int(input())

C_or_D = (N-1) // 999


name = ""

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

#ame += str(n)

print(name)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a.b=map(int,input().split())
print((b-a)*(b-a+1)/2-b)

a,b=map(int,input().split())
print((b-a)*(b-a+1)/2-b)

a,b=map(int,input().split())
print(((b-a)**2-a-b)//2)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a, b = input().split(' ')
diff = int(b) - int(a)
a_orig = sum([i for i in range(1, diff)])
snow = a_orig - a
print(snow)

a, b = map(int, input().split())
d = b - a
print(d * (d + 1) // 2 - b)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
a,b=map(int,input().split())
s=0
for i in range(1,b-a+1):
  s=s+i
print(s-a)

a,b=map(int,input().split())
s=0
for i in range(b-a+1):
  s=s+i
print(s-a)

a,b=map(int,input().split())
s=0
for i in range(1,b-a):
  s=s+i
print(s-a)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
SUM=[0]
sum=0
for i in range(1000):
  sum+=i
  SUM.append(sum)
a,b=map(int,input().split())
print(SUM[b-a]-b)

SUM=[0]
sum=0
for i in range(1,1000):
  sum+=i
  SUM.append(sum)
a,b=map(int,input().split())
print(SUM[b-a]-b)

Verdicts: Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
# -*- coding: utf-8 -*
a_b = input().split()
a = int(a_b[0])
b = int(a_b[1])
n = b - a

h = (n - 1) * n / 2 - a


# -*- coding: utf-8 -*-
a_b = input().split()
a = int(a_b[0])
b = int(a_b[1])
n = b - a

h = (n - 1) * n / 2 - a

print(int(h))


Verdicts: Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a, b = map(int, input().split())
print((b-a)*(b-a-1)//2-a)

Verdicts: Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a,b=map(int,input().split())
n=b-a
print(int(n*(n+1)/2-b))


Verdicts: Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
x = list(map(int,input().split( )))
z = x[1]-x[0]
t = 0
for s in range(z+2):
    t += s
    
print(t-x[1])

x,y = map(int,input( ))
z = y-x
t = 0
for s in range(z+1):
    t += s
    
print(t-y)

x = list(map(int,input().split( )))
z = x[1]-x[0]
t = 0
for s in range(z+1):
    t += s
    
print(t-x[1])

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a, b = map(int, input().split())
d = b - a

def memorize(f):
	table = []
	def func(*args):
		if not args in table:
			table[args] = f(*args)
		return table[args]
	return func

@memorize
def s(n):
	if n <= 1:
		return 1
	else:
		return s(n-1)+n
print(s(d-1)-a)

a, b = map(int, input().split())
d = b - a
print(int((d*(d+1)/2)-b))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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


a,b = map(int,input().split())
print((1+(b-a))*(b-a))

a,b = map(int,input().split())
print(((1+(b-a))*(b-a))//2-b)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
a,b=map(int,input().split())
n=b-a-1
print(int(h-a))

a,b=map(int,input().split())
n=b-a-1
h=n*(n+1)/2
print(h-a)

a,b=map(int,input().split())
n=b-a-1
h=n*(n+1)/2
print(int(h-a))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
a, b = map(int,input().split())
x =0
ans =0
for i in range(x):
  ans = ans + 1

print(ans -a)

a, b = map(int,input().split())
x =b -a

ans =0
for i in range(x):
  ans = ans + 1

print(ans -a)


a, b = map(int,input().split())
x =b -a -1
ans = (1+x)*x//2

print(ans -a)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a,b = map(int,input().split())
diff = b - a
ans = diff * (diff+1) // 2
ans -= b
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a,b=map(int,input().split())
i=b-a
print(i*(i+1)//2-b)


Verdicts: Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
a,b = map(int,input().split())
height = 0
for i in range(1,1000):
    height += i
    if b - a >= i:
        print(height - b)
        break

a,b = map(int,input().split())
height = 0
for i in range(1,b):
    height += i
    if b - a == i:
        print(height - i-a)
        break

Verdicts: Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
a,b=map(int,input().split())
x=b-a
ams=0
for i in range(x+1):
    ans+=i
print(ans-b)    


a,b=map(int,input().split())
x=b-a
ans=0
for i in range(x+1):
    ans+=i
print(ans-b)    


Verdicts: Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
a,b = map(int,input().split())
df = b-a
nums = []
cnt = 0
for i in range(1,1000):
    cnt += i
    nums.append(cnt)
    if nums[i] - nums[i-1] == df:
        print(nums[i] - b)
        exit()

a,b = map(int,input().split())
df = b-a
nums = []
cnt = 0
for i in range(1,1000):
    cnt += i
    nums.append(cnt)

for i in nums[1:]:
    if i - (i-1) == df:
        print(i - b)
        break

x,y = map(int,input().split())
h=y-x
a=0
for i in range(h-1):
   a+=i+1
print(a-x)  

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a,b=map(int,input().split())
print((b-a-1)(b-a-2)/2)

a,b=map(int,input().split())
print((b-a)*(b-a+1)//2-b)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a,b=map(int,input().split())
print((b-a)*(1+b-a)//2-b)

Verdicts: Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
a, b = (int(i) for i in input().split())  
c = b-a
num = 0
for i in range(c):
     num += i

print(a-num)

a, b = input().split()
a = int(a)
b = int(b)
c = b-a
num = 0
for i in range(c):
     num += i

print(a-num)

a, b = (int(i) for i in input().split())  
c = b-a
num = 0
for i in range(c):
     num += i

print(num-a)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

Submission attempts (in order):
# B - Stone Monument
N, M = map(int,input().split())

tmp= (M-N)*( M-N+1)/2

ans( tmp-N)

# B - Stone Monument
a,b =map(int,input().split())

tmp= (b-a)*( b-a-1)/2

print(  int(tmp-a))

Verdicts: Runtime Error

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

if __name__ == '__main__':

    a,b = list(map(int,input().split()))
    tower = []
    for i in range(1000):
        if i == 0:
            tower.append(1)
        else:
            tower.append(tower[i-1]+i+1)
    d = []
    for i in range(999):
        d.append(tower[i+1]-tower[i])
    for i in range(999):
        if a-b == d[i]:
            print(tower[i]-a)


#coding : utf-8

if __name__ == '__main__':

    a,b = list(map(int,input().split()))
    tower = []
    for i in range(1000):
        if i == 0:
            tower.append(1)
        else:
            tower.append(tower[i-1]+i+1)
    d = []
    for i in range(999):
        d.append(tower[i+1]-tower[i])
    for i in range(999):
        if b-a == d[i]:
            print(tower[i]-a)


Verdicts: Wrong Answer

Accepted
Problem: In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter.  It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower.  Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.  Assume also that the depth of the snow cover is always at least 1 meter.

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

a, b = map(int, input().split())
n = b - a
print(int(n*(n+1)/2-b))

Verdicts: Runtime Error

Accepted