problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03327
u153729035
2,000
262,144
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.
['from math import log\nfrom functools import lru_cache\n \nn=int(input())\n \na=int(log(n,6))\nb=int(log(n,9))\nl=list(set([1]+[6**i for i in range(a+1)]+[9**i for i in range(b+1)]))\n \n@lru_cache(maxsize=100000)\ndef func(n):\n if n<=0: return 1000000\n if n in l:return 1\n return min([func(n-li) for li in l])+1\n \nprint(func)', "print('AB'+'CD'[int(input())//1000])"]
['Wrong Answer', 'Accepted']
['s459345835', 's258370827']
[3572.0, 2940.0]
[23.0, 17.0]
[340, 36]
p03327
u155236040
2,000
262,144
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.
["n = int(input())\nif n > 999:\n print('ABD'+'{:0>3}'.format(n-999))\nelse:\n print('ABC'+'{:0>3}'.format(n))", "n = int(input())\nif n > 999:\n print('ABD')\nelse:\n print('ABC')"]
['Wrong Answer', 'Accepted']
['s079401869', 's637729550']
[2940.0, 2940.0]
[18.0, 17.0]
[110, 68]
p03327
u156815136
2,000
262,144
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.
['import itertools\ndef main():\n n = int(input())\n print(("ABC"+\'{:03}\'.format(n))if n<=999 else "ABD"+\'{:03}\'.format(n-999))\nif __name__ == \'__main__\':\n main()', 'import itertools\ndef main():\n n = int(input())\n print("ABC"if n<=999 else "ABD")\nif __name__ == \'__main__\':\n main()']
['Wrong Answer', 'Accepted']
['s103142356', 's363476012']
[3060.0, 3060.0]
[17.0, 17.0]
[160, 118]
p03327
u159335277
2,000
262,144
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.
["n = int(input())\n\nif n >= 1000:\n print('ABC')\nelse:\n print('ABD')", "n = int(input())\nif n >= 1000:\n print('ABD')\nelse:\n print('ABC')"]
['Wrong Answer', 'Accepted']
['s902112018', 's552852788']
[2940.0, 2940.0]
[17.0, 18.0]
[67, 66]
p03327
u161373155
2,000
262,144
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.
["#coding : utf-8\n\nif __name__ == '__main__':\n\n N = int(input())\n n = int(N/999)\n if n == 0:\n print('ABC')\n elif n == 1:\n print('ABD')\n elif n == 2:\n print('ABE')", "#coding : utf-8\n\nif __name__ == '__main__':\n\n N = int(input())\n if n < 1000:\n print('ABC')\n else:\n print('ABD')", "#coding : utf-8\n\nif __name__ == '__main__':\n\n N = int(input())\n if N < 1000:\n print('ABC')\n else:\n print('ABD')"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s492150868', 's593018567', 's418935082']
[3064.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[196, 134, 134]
p03327
u163543660
2,000
262,144
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.
['a, b = map(int, input().split())\nn = b - a\nprint(int(n*(n+1)/2-b))', 'a,b=map(int,input().split())\nn=b-a\nprint(int(n*(n+1)/2-b))', 'a, b = map(int, input().split())\nprint(((b-a)*(b-a+1)/2)-b)', 'a, b = map(int, input().split())\nans = int(((b-a)*(b-a+1)/2)-b)\nprint(ans)', 'a,b=map(int,input().split())\nn=b-a\nprint(int(n*(n+1)/2-b))', 'a,b=map(int,input().split())\nn=b-a\nprint(int(n*(n+1)/2-b))', 'a,b=map(int,input().split())\nn=b-a\nprint(int(n*(n+1)/2-b))', 'a, b = map(int, input().split())\nn = b - a\nprint(int(n*(n+1)/2-b))', 'a, b = map(int, input().split())\nans = int(((b-a)*(b-a+1)/2)-b)\nprint(ans)', 'n = int(input())\nif n > 999:\n print("ABD")\n exit()\nprint("ABC")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s208898176', 's348619664', 's636354129', 's793023773', 's898236445', 's900161686', 's914196599', 's967345544', 's999944018', 's218713400']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 19.0, 17.0, 17.0, 19.0]
[66, 58, 59, 74, 58, 58, 58, 66, 74, 69]
p03327
u163874353
2,000
262,144
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.
['N = input()\nif N >= 1000:\n print("ABD")\nelse:\n print("ABC")', 'N = int(input())\nif N >= 1000:\n print("ABD")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s138827375', 's813287761']
[2940.0, 2940.0]
[18.0, 17.0]
[65, 70]
p03327
u166621202
2,000
262,144
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.
['N = int(input())\nunder = "ABC"\nover = "ABD"\n\nif N > 1000:\n tmp = str(N-1000)\n print(over + tmp)\nelse:\n tmp = str(N)\n print(under + tmp)', 'N = int(input())\nunder = "ABC"\nover = "ABD"\n\nif N > 1000:\n# tmp = str(N-1000)\n print(over)\nelif N == 1000:\n print("ABD")\nelse:\n# tmp = str(N)\n print(under)']
['Wrong Answer', 'Accepted']
['s424879931', 's627223793']
[2940.0, 2940.0]
[17.0, 17.0]
[139, 160]
p03327
u170201762
2,000
262,144
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.
['inf = 1000*500*500\nD = []\nc = []\nd = {}\nN,C = map(int,input().split())\nfor i in range(C):\n D.append(list(map(int,input().split())))\nfor i in range(N):\n c.append(list(map(int,input().split())))\n\nfor C1 in range(C):\n for C2 in range(C):\n for C3 in range(C):\n if C1 != C2 and C2 != C3 and C3 != C1:\n d[(C1+1,C2+1,C3+1)]=0\n else:\n d[C1+1,C2+1,C3+1]=inf\n\nfor i in range(N):\n for j in range(N):\n for C1 in range(C):\n for C2 in range(C):\n for C3 in range(C):\n if (i+j)%3==0:\n d[(C1+1,C2+1,C3+1)]+=D[c[i][j]-1][C1]\n elif (i+j)%3==1:\n d[(C1+1,C2+1,C3+1)]+=D[c[i][j]-1][C2]\n else:\n d[(C1+1,C2+1,C3+1)]+=D[c[i][j]-1][C3]\n\nl = []\nfor x in d:\n l.append(d[x])\nprint(min(l))\n', 'n = int(input())\nif n > 999:\n print("ABD")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s089566170', 's365235516']
[3064.0, 2940.0]
[17.0, 18.0]
[893, 68]
p03327
u173329233
2,000
262,144
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.
['fghj', 'n = int(input())\nlist = []\n\nwhile n > 9**5:\n n = n - 9**5\n list.append(1)\n\nwhile n > 6**6:\n n = n - 6**6\n list.append(1)\n\n\nwhile n > 6**5:\n n = n - 6**5\n list.append(1)\n\n\nfor i in [4,3,2,1]:\n\n for r in [9,6,]:\n while n > r**i:\n n = n - r**i\n list.append(r**i)\n\n\n\nlength = len(list) + n\nprint(length)', "n = int(input())\nif n<1000:\n print('ABC')\nelse:\n print('ABD')\n"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s788672082', 's957281310', 's034454081']
[2940.0, 3064.0, 2940.0]
[18.0, 17.0, 18.0]
[12, 349, 68]
p03327
u177040005
2,000
262,144
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.
['import numpy as np\n\nN = int(input())\n\nans = N\nres = 0\nfor i in range(N+1):\n res = 0\n t = i\n while t > 0:\n res += t%6\n t //= 6\n t = N - i\n while t > 0:\n res += t%9\n t //= 9\n\n if res < ans:\n ans = res\n\n\n\nprint(ans)\n', "N = int(input())\n\nif N <= 999:\n print('ABC')\nelse:\n print('ABD')\n"]
['Wrong Answer', 'Accepted']
['s255694973', 's890464202']
[12424.0, 3064.0]
[153.0, 18.0]
[266, 71]
p03327
u182047166
2,000
262,144
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.
['import sys\n\n\ndef input():\n return sys.stdin.readline()[:-1]\n\n# N = int(input())\n# A = [int(x) for x in input().split()]\n# a, b, c = map(int, input().split())\n# name1 = str(input())\n# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}\nn = int(input())\nif n>999:\n print("ABC")\nelse:\n print("ABD")', 'import sys\n\n\ndef input():\n return sys.stdin.readline()[:-1]\n\n# N = int(input())\n# A = [int(x) for x in input().split()]\n# a, b, c = map(int, input().split())\n# name1 = str(input())\n# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}\nn = int(input())\nif n<1000:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s547951046', 's275641787']
[2940.0, 2940.0]
[17.0, 17.0]
[300, 301]
p03327
u182509543
2,000
262,144
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.
['\n# coding: utf-8\n\n# In[40]:\n\n\nN = int(input())\n\n\n# In[41]:\n\n\nthird_letter = "C"\n\n\n# In[42]:\n\n\na = int(N / 999)\nb = N % 999\n\n\n# In[43]:\n\n\n\n\n# In[44]:\n\n\nletter_ascii = ord(third_letter) + a\n\n\n# In[45]:\n\n\nletter = chr(letter_ascii)\n\n\n# In[46]:\n\n# In[47]:\n\n\noutput = "AB" + letter \n\n\n# In[48]:\n\n\nprint(output)\n\n', '\n# coding: utf-8\n\n# In[28]:\n\n\nN = 1854\n\n\n# In[29]:\n\n\nthird_letter = "C"\n\n\n# In[30]:\n\n\na = int(N / 999)\nb = N % 999\n\n\n# In[31]:\n\n\n\n\n# In[32]:\n\n\nletter_ascii = ord(third_letter) + a\n\n\n# In[33]:\n\n\nletter = chr(letter_ascii)\n\n\n# In[34]:\n\n\nnum = str(b)\nfor i in range(3):\n if len(num) < 3:\n num = "0" + num\n\n\n# In[35]:\n\n\noutput = "AB" + letter + num\n\n\n# In[36]:\n\n\nprint(output)\n\n', '\n# coding: utf-8\n\n# In[28]:\n\n\nN = 1854\n\n\n# In[29]:\n\n\nthird_letter = "C"\n\n\n# In[30]:\n\n\na = int(N / 999)\nb = N % 999\n\n\n# In[31]:\n\n\nprint(a)\n\n\n# In[32]:\n\n\nletter_ascii = ord(third_letter) + a\n\n\n# In[33]:\n\n\nletter = chr(letter_ascii)\n\n\n# In[34]:\n\n# In[35]:\n\n\noutput = "AB" + letter\n\n\n# In[36]:\n\n\nprint(output)\n\n', '\n# coding: utf-8\n\n# In[28]:\n\n\nN = 1854\n\n\n# In[29]:\n\n\nthird_letter = "C"\n\n\n# In[30]:\n\n\na = int(N / 999)\nb = N % 999\n\n\n# In[31]:\n\n\n\n\n# In[32]:\n\n\nletter_ascii = ord(third_letter) + a\n\n\n# In[33]:\n\n\nletter = chr(letter_ascii)\n\n\n# In[34]:\n\n\n# In[35]:\n\n\noutput = "AB" + letter\n\n\n# In[36]:\n\n\nprint(output)\n\n', '\n# coding: utf-8\n\n# In[95]:\n\n\nN = int(input())\n\n\n# In[96]:\n\n\nthird_letter = "C"\n\n\n# In[97]:\n\n\na = int(N / 1000)\nb = N % 999\n\n\n# In[99]:\n\n\nletter_ascii = ord(third_letter) + a\n\n\n# In[100]:\n\n\nletter = chr(letter_ascii)\n\n\n# In[101]:\n\n\noutput = "AB" + letter\n\n\n# In[102]:\n\n\nprint(output)\n\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s061906661', 's095440354', 's292273143', 's759846447', 's224758602']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[307, 384, 307, 299, 285]
p03327
u183200783
2,000
262,144
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.
['N = int(input())\n\nif N < 1000:\n print("ABC" + str(N))\nelse:\n print("ABD" + str(N - 999))\n', 'N = int(input())\n\nif N < 1000:\n print("ABC" + N)\nelse:\n print("ABD" + (N - 999))', 'N = int(input())\n\nif N < 1000:\n print("ABC")\nelse:\n print("ABD")\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s807510331', 's918619003', 's766508678']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[91, 82, 67]
p03327
u185294445
2,000
262,144
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.
["import numpy as np\nN =int(input())\nK=''\nif N > 999:\n N -= 999\n if N<10:\n K = 'ABD00' +str (N)\n elif N < 100:\n K = 'ABD0' + str(N)\n else:\n K = 'ABD' + str(N)\nelse:\n if N<10:\n K = 'ABC00' + str(N)\n elif N < 100:\n K = 'ABC0' + str(N)\n else:\n K = 'ABC' + str(N)\nprint(K)", "import numpy as np\nN =int(input())\nK=''\nif N > 999:\n K='ABD'\nelse:\n K='ABC'\nprint(K)"]
['Wrong Answer', 'Accepted']
['s264371998', 's460622570']
[21400.0, 21140.0]
[1838.0, 1871.0]
[329, 90]
p03327
u185464141
2,000
262,144
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.
['n = int(input())\nif(n > 999):\n\tprint("ABD{}".format(n % 1000))\nelse:\n\tprint("ABC{}".format(n))', 'n = int(input())\nif(n > 999):\n\tprint("ABD")\nelse:\n\tprint("ABC")']
['Wrong Answer', 'Accepted']
['s663696858', 's239743447']
[2940.0, 2940.0]
[18.0, 18.0]
[94, 63]
p03327
u187205913
2,000
262,144
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.
["n = int(input())\nif n>=1000:\n print('ABD{}'.format(n-999))\nelse:\n print('ABC{}'.format(n))", "n = int(input())\nif n>=1000:\n print('ABD')\nelse:\n print('ABC')"]
['Wrong Answer', 'Accepted']
['s320216757', 's679970460']
[2940.0, 2940.0]
[17.0, 18.0]
[96, 68]
p03327
u197300773
2,000
262,144
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.
['N,C=map(int,input().split())\n\nD=[list(map(int,input().split())) for i in range(C)]\ngrid=[list(map(int,input().split())) for i in range(N)]\n\na=[[0]*C for i in range(3)]\n\n\nfor i in range(N):\n tmp=i%3\n for j in range(N):\n a[tmp][grid[i][j]-1]+=1\n tmp=(tmp+1)%3\n\nb=[[0]*C for i in range(3)]\nfor i in range(3):\n for j in range(C):\n b[i][j]=sum([ D[k][j] * a[i][k] for k in range(C)])\n\nb=[ sorted([ [b[i][j],j] for j in range(C)]) for i in range(3)]\n\nans=1000000000\nfor i in range(3):\n for j in range(3):\n for k in range(3):\n if b[0][i][1]!=b[1][j][1] and b[1][j][1]!=b[2][k][1] and b[2][k][1]!=b[0][i][1]:\n ans=min(ans,b[0][i][0]+b[1][j][0]+b[2][k][0])\n\nprint(ans)', 'n=int(input())\nprint("ABC" if n<1000 else "ABD")']
['Runtime Error', 'Accepted']
['s638392460', 's800978465']
[3064.0, 2940.0]
[18.0, 17.0]
[725, 48]
p03327
u202826462
2,000
262,144
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.
['n = input()\nif n >= 1000:\n ans = "ABD"\nelse:\n ans = "ABC"\nprint(ans)', 'n = int(input())\nif n >= 1000:\n ans = "ABD"\nelse:\n ans = "ABC"\nprint(ans)']
['Runtime Error', 'Accepted']
['s670682581', 's400234454']
[2940.0, 3060.0]
[17.0, 19.0]
[74, 79]
p03327
u203886313
2,000
262,144
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.
['n = int(input())\n\nif n >= 999: print("ABD")\nelse: print("ABC")', 'n = int(input())\n\nif 1000 <= n <= 1998: print("ABD")\nelif n <= 999: print("ABC")']
['Wrong Answer', 'Accepted']
['s867354006', 's687333581']
[2940.0, 2940.0]
[17.0, 20.0]
[62, 80]
p03327
u204616996
2,000
262,144
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.
["N=int(input())\nif N<1000:\n print('ABC{0}'.format(N))\nelse:\n print('ABD{0}'.format((N+1)%1000))", "N=int(input())\nif N<1000:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s606078157', 's630898767']
[2940.0, 2940.0]
[18.0, 17.0]
[96, 61]
p03327
u209918867
2,000
262,144
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.
["n=int(input())\nprint('ABC{}'.format(n) if n<1000 else 'ABD{}'.format(n-999))", "n=int(input())\nprint('ABC' if n<1000 else 'ABD')"]
['Wrong Answer', 'Accepted']
['s560698824', 's952050955']
[2940.0, 2940.0]
[18.0, 18.0]
[76, 48]
p03327
u210369205
2,000
262,144
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.
['N = int(input())\nDP = [100000000] * (N+1)\nDP[0] = 0\nfor i in range (N):\n DP[i + 1] = DP[i] + 1\n for j in range (8):\n if 6**j <= i + 1:\n DP[i + 1] = min(DP[i + 1],DP[i + 1 - 6**j] + 1)\n for j in range (8):\n if 9**j <= i + 1:\n DP[i + 1] = min(DP[i + 1],DP[i + 1 - 9**j] + 1)\nprint(DP[N])', 'N = int(input())\nif N >999:\n print("ABD")\nelse:\n print("ABC")']
['Wrong Answer', 'Accepted']
['s255743246', 's135220214']
[3064.0, 2940.0]
[38.0, 17.0]
[330, 63]
p03327
u216631280
2,000
262,144
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.
["n = int(input())\nif n > 999:\n\tprint('ABD')\nelse:\n\tprint('ABD')", "n = int(input())\nif n > 999:\n\tprint('ABD')\nelse:\n\tprint('ABC')"]
['Wrong Answer', 'Accepted']
['s889935080', 's328072563']
[2940.0, 2940.0]
[18.0, 17.0]
[62, 62]
p03327
u217303170
2,000
262,144
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.
['A, B = map(int, input().split())\n \ndiff = B - A\nheight_A = diff * (diff - 1) // 2\n \nans = height_A - A\n \nprint(ans)', "n=int(input())\nprint('ABC' if n < 1000 else 'ABD')"]
['Runtime Error', 'Accepted']
['s366240976', 's023161774']
[2940.0, 2940.0]
[17.0, 17.0]
[115, 50]
p03327
u217627525
2,000
262,144
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.
['n=int(input())\nif n<1000:\n n_s=str(n).zfill(3)\n print("ABC"+n_s)\nelse:\n n=n%1000+1\n n_s=str(n).zfill(3)\n print("ABD"+n_s)', 'n=int(input())\nif n<1000:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s953535512', 's484676109']
[2940.0, 2940.0]
[17.0, 17.0]
[136, 65]
p03327
u219607170
2,000
262,144
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.
['N = int(input())\nnum = 0\ndrawlist = [1, 6, 6**2, 6**3, 6**4, 6**5, 6**6,\n 9, 9**2, 9**3, 9**4, 9**5]\ndrawlist.sort()\ndrawlist.reverse()\nwhile N:\n for d in drawlist:\n if N >= d:\n N = N - d\n num = num + 1\n break\nprint(num)', "N = int(input())\nif N <= 999:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s181452803', 's087594437']
[3060.0, 2940.0]
[19.0, 17.0]
[274, 69]
p03327
u221345507
2,000
262,144
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.
["N=int(input())\nif N<1000:\n print('ABC%03d'%(N))\nelse:\n N=N-999\n print('ABD%03d'%(N))", "N=int(input())\nif N<1000:\n print('ABC%03d'%(N))\nelse:\n N=N-999\n print('ABD%03d'%(N))", "N=int(input())\nif N<1000:\n print('ABC')\nelse:\n N=N-999\n print('ABD')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s035749176', 's077003298', 's784498194']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0]
[93, 93, 77]
p03327
u221944793
2,000
262,144
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.
['N=int(input())\n\nif N<=999:\n print("ABC"+str(N))\nelse:\n print("ABD"+str(N-1000+1))\n\n\n', 'N=int(input())\n\nif N<=999:\n print("ABC"+str(N))\nelse:\n print("ABR"+str(N-1000+1))\n\n\n', 'N=int(input())\n\nif N<=999:\n print("ABC")\nelse:\n print("ABD")\n\n\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s380517448', 's840221737', 's468290937']
[9068.0, 9148.0, 9140.0]
[30.0, 25.0, 30.0]
[86, 86, 65]
p03327
u222801992
2,000
262,144
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.
['n=int(input())\nif n<=999:\n print("ABC"+str(n))\nelse:\n print("ABD"+str(n-999))', 'n=int(input())\nif n<=999:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s529166051', 's825721169']
[2940.0, 2940.0]
[17.0, 17.0]
[79, 61]
p03327
u223904637
2,000
262,144
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.
['x,y = map(int,input().split())\na=y-x\nb=a*(a-1)/2\nprint(round(b-x))\n', "n=int(input())\nif n<=999:\n print('ABC')\nelse:\n print('ABD')"]
['Runtime Error', 'Accepted']
['s381857124', 's058090664']
[2940.0, 2940.0]
[17.0, 17.0]
[67, 65]
p03327
u227279746
2,000
262,144
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.
["n = int(input())\n\ns = input()\n\nif n < 1000:\n print('ABC')\n\nelif 1000 <= n <= 1998:\n print('ABD')", "N = int(input())\n\ns = input()\n\nif N < 1000:\n print('ABC')\n\nelif 1000 <= N <= 1998:\n print('ABD')", "N = int(input())\n\ns = input()\n\nif N < 1000:\n print('ABC')\n\nelif N > 999:\n print('ABD')", "N = int(input())\n\nif N < 1000:\n print('ABC')\n\nelif 1000 <= N <= 1998:\n print('ABD')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s187777631', 's259903285', 's433176985', 's458390502']
[9136.0, 9064.0, 9148.0, 9080.0]
[26.0, 25.0, 25.0, 28.0]
[102, 102, 92, 89]
p03327
u228223940
2,000
262,144
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.
['n = int(input())\n\nif n % 999 == 0:\n print(999)\nelse:\n print(n%999)', "n = int(input())\n\nif n <= 999:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s061782177', 's027005641']
[2940.0, 2940.0]
[17.0, 17.0]
[72, 70]
p03327
u228232845
2,000
262,144
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.
["from collections import defaultdict, deque\nimport sys\n\n\ndef LI(): return list(map(int, sys.stdin.buffer.readline().split()))\ndef I(): return int(sys.stdin.buffer.readline())\ndef LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()\ndef S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef LSR(n): return [LS() for i in range(n)]\ndef SRL(n): return [list(S()) for i in range(n)]\ndef MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]\n\n\nn = I()\nif n >= 1000:\n ans = 'ABD'\n if len(str(n - 999)) == 1:\n ans += '00' + str(n - 999)\n elif len(str(n - 999)) == 2:\n ans += '0' + str(n - 999)\n else:\n ans += str(n - 999)\n\nelse:\n ans = 'ABC'\n if len(str(n)) == 1:\n ans += '00' + str(n)\n elif len(str(n)) == 2:\n ans += '0' + str(n)\n else:\n ans += str(n)\nprint(ans)\n", "from collections import defaultdict, deque\nimport sys\n\n\ndef LI(): return list(map(int, sys.stdin.buffer.readline().split()))\ndef I(): return int(sys.stdin.buffer.readline())\ndef LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()\ndef S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef LSR(n): return [LS() for i in range(n)]\ndef SRL(n): return [list(S()) for i in range(n)]\ndef MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]\n\n\nn = I()\nif n >= 1000:\n ans = 'ABD'\n if len(str(n - 999)) == 1:\n ans += '00' + str(n - 999)\n elif len(str(n - 999)) == 2:\n ans += '0' + str(n - 999)\n else:\n ans += str(n - 999)\n\nelse:\n ans = 'ABC'\n if len(str(n)) == 1:\n ans += '00' + str(n)\n elif len(str(n)) == 2:\n ans += '0' + str(n)\n else:\n ans += str(n)\n", "from collections import defaultdict, deque\nimport sys\n\n\ndef LI(): return list(map(int, sys.stdin.buffer.readline().split()))\ndef I(): return int(sys.stdin.buffer.readline())\ndef LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()\ndef S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef LSR(n): return [LS() for i in range(n)]\ndef SRL(n): return [list(S()) for i in range(n)]\ndef MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]\n\n\nn = I()\nif n >= 1000:\n print('ABD' + str(n - 999))\nelse:\n print('ABC' + str(n))\n", "from collections import defaultdict, deque\nimport sys\n\n\ndef LI(): return list(map(int, sys.stdin.buffer.readline().split()))\ndef I(): return int(sys.stdin.buffer.readline())\ndef LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()\ndef S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef LSR(n): return [LS() for i in range(n)]\ndef SRL(n): return [list(S()) for i in range(n)]\ndef MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]\n\n\nn = I()\nif n >= 1000:\n ans = 'ABD'\n if len(str(n - 999)) == 1:\n ans += '00' + str(n - 999)\n elif len(str(n - 999)) == 2:\n ans += '0' + str(n - 999)\n else:\n ans += str(n - 999)\n\nelse:\n ans = 'ABC'\n if len(str(n)) == 1:\n ans += '00' + str(n)\n elif len(str(n)) == 2:\n ans += '0' + str(n)\n else:\n ans += str(n)\nprint(ans[:3])\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s074922105', 's128080808', 's324194613', 's227650920']
[3316.0, 3316.0, 3444.0, 3316.0]
[21.0, 21.0, 26.0, 21.0]
[996, 985, 698, 1000]
p03327
u229429359
2,000
262,144
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.
['N = input()\n\nif len(N)<=3:\n print("ABC")\nelse:\n print("ABD)\n', 'N = input()\n\nif len(N)<=3:\n print("ABC")\nelse:\n print("ABD")\n']
['Runtime Error', 'Accepted']
['s681312915', 's352203259']
[2940.0, 2940.0]
[17.0, 17.0]
[62, 63]
p03327
u229518917
2,000
262,144
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.
['a,b=map(int,input().split())\nn=b-a\nsummy=((n+1)*n)/2\nprint(int(summy-b))', "N=int(input())\nprint('ABC' if N<=999 else'ABD')"]
['Runtime Error', 'Accepted']
['s468387132', 's587924669']
[2940.0, 2940.0]
[17.0, 19.0]
[72, 47]
p03327
u235066013
2,000
262,144
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.
["n=input()\nif n>=1000:\n print('ABD')\nelse:\n print('ABC')", "n=int(input())\nif n>=1000:\n print('ABD')\nelse:\n print('ABC')"]
['Runtime Error', 'Accepted']
['s937401127', 's276792205']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 62]
p03327
u235084192
2,000
262,144
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.
["N = int(input())\n\nif N <= 999:\n print('ABC{}'.format(N))\nelse:\n print('ABD{}'.format(N-999))", "N = int(input())\n\nif N <= 999:\n print('ABC{:03}'.format(N))\nelse:\n print('ABD{:03}'.format(N-999))", "N = int(input())\n\nif N <= 999:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s027402973', 's306992296', 's152644607']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[94, 100, 66]
p03327
u239091426
2,000
262,144
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.
['n = int(input())\nif n <= 9:\n print("ABC00"+str(n))\nelif n <= 99:\n print("ABC0"+str(n))\nelif n <= 999:\n print("ABC"+str(n))\nelif n <= 1008:\n print("ABD00"+str(n-999))\nelif n <= 1098:\n print("ABD0"+str(n-999))\nelse:\n print("ABD"+str(n-999))', 'n = int(input())\nif n <= 999:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s729201001', 's242839751']
[9100.0, 9008.0]
[30.0, 26.0]
[244, 65]
p03327
u243159381
2,000
262,144
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.
["s=int(input())\nif s<1000:\n print('ABC'+str(s))\nelse:\n print('ABD'+str(s-999))", "s=int(input())\nif s<=999:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s993140013', 's894480012']
[9052.0, 8988.0]
[27.0, 27.0]
[83, 65]
p03327
u244118793
2,000
262,144
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.
['a,b = [int(i) for i in input().split()]\n\nsouwa = 0\nn = b - a\nfor i in range(n):\n souwa += i\n \nx = souwa - b\n \nprint(x)', ' a,b = [int(i) for i in input().split()]\n \n souwa = 0\n n = b - a\n for i in range(n):\n souwa += i\n \n x = souwa - b\n \n print(x)', 'a, b = [int(i) for i in input().split()]\n \nsouwa = 0\nn = b - a\nfor i in range(n):\n souwa += i\n \nx = souwa - b\n \nprint(x)', "n = int(input())\nif n<1000:\n print('ABC')\nelse:\n print('ABD')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s278450544', 's774265662', 's914871091', 's888045752']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[129, 170, 136, 67]
p03327
u244836567
2,000
262,144
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.
['a=int(input())\nif a<10:\n print("ABC00"+str(a))\nelif 10<=a<100:\n print("ABC0"+str(a))\nelif 100<=a<1000:\n print("ABC"+str(a))\nelif 1000<=a<1010:\n print("ABD00"+str(a-999))\nelif 1010<=a<1100:\n print("ABD0"+str(a-999))\nelse:\n print("ABD"+str(a-999))', 'a=int(input())\nif a<10:\n print("ABC00"+a)\nelif 10<=a<100:\n print("ABC0"+a)\nelif 100<=a<1000:\n print("ABC"+a)\nelif: 1000<=a<1010:\n print("ABD00"+a)\nelif: 1010<=a<1100:\n print("ABD0"+a)\nelse:\n print("ABD"+a)', 'a=int(input())\nif a<10:\n print("ABC00"+str(a))\nelif 10<=a<100:\n print("ABC0"+str(a))\nelif 100<=a<1000:\n print("ABC"+str(a))\nelif: 1000<=a<1010:\n print("ABD00"+str(a))\nelif: 1010<=a<1100:\n print("ABD0"+str(a))\nelse:\n print("ABD"+str(a))', 'a=int(input())\nif a<10:\n print("ABC00"+str(a))\nelif 10<=a<100:\n print("ABC0"+str(a))\nelif 100<=a<1000:\n print("ABC"+str(a))\nelif 1000<=a<1010:\n print("ABD00"+str(a))\nelif 1010<=a<1100:\n print("ABD0"+str(a))\nelse:\n print("ABD"+str(a))', 'a=int(input())\nif a<1000:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s042394947', 's052442204', 's131268442', 's859923700', 's027984088']
[9196.0, 8864.0, 9024.0, 9196.0, 9140.0]
[26.0, 29.0, 26.0, 28.0, 27.0]
[251, 211, 241, 239, 61]
p03327
u246639932
2,000
262,144
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.
['N = map(int, input().split())\nprint("ABC" if N<=999 else "ABD")', 'N = input()\nprint("ABC" if N<=999 else "ABD")', 'N = int(input())\nprint("ABC" if N<=999 else "ABD")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s309366810', 's352526576', 's261173198']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[63, 45, 50]
p03327
u248221744
2,000
262,144
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.
['N = input()\nif N <= 999:\n pirnt("ABC")\nelse:\n print("ABD")', 'N = int(input())\nif N <= 999:\n print("ABC")\nelse:\n print("ABD")']
['Runtime Error', 'Accepted']
['s980383713', 's570463919']
[2940.0, 2940.0]
[17.0, 17.0]
[60, 65]
p03327
u251017754
2,000
262,144
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.
["N = int(inut())\nif N <= 999:\n print('ABC')\nelse:\n print('ABD')", "N = int(input())\nif N <= 999:\n print('ABC')\nelse:\n print('ABD')"]
['Runtime Error', 'Accepted']
['s668246597', 's863966785']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 65]
p03327
u253952966
2,000
262,144
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.
["n = int(input())\nif n < 1000:\n print('ABC' + str(n))\nelse:\n print('ABD' + str(n-999))\n", "n = int(input())\nif n < 1000:\n print('ABC{0:0>3}'.format(n))\nelse:\n print('ABD{0:0>3}'.format(n-999))\n", "n = int(input())\nif n < 1000:\n print('ABC')\nelse:\n print('ABD')\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s844403103', 's999947470', 's163545542']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[88, 104, 66]
p03327
u255020959
2,000
262,144
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.
["N = int(input())\n\nif 1998>=N>=999:\n print('ABD')\nelse:\n print('ABC')", "N = int(input())\n\nif 999>=N>=1:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s945807298', 's561768066']
[9144.0, 8828.0]
[28.0, 27.0]
[75, 72]
p03327
u255067135
2,000
262,144
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.
['import math\ndef dfs(cost, N):\n if N<6 :\n return cost+N\n else:\n ret0 = 6 ** math.floor(math.log(N, 6))\n ret1 = 9 ** math.floor(math.log(N, 9))\n if (ret0>1) and (ret1>1):\n return min(dfs(cost+1, N-ret0), dfs(cost+1, N-ret1))\n else:\n ret = max(ret0, ret1)\n return dfs(cost+1, N-ret)\n\nN = int(input())\nprint(dfs(0, N))', 'def dfs(cost, N):\n if N<6 :\n return cost+N\n else:\n ret0 = 6 ** math.floor(math.log(N, 6))\n ret1 = 9 ** math.floor(math.log(N, 9))\n if (ret0>1) and (ret1>1):\n return min(dfs(cost+1, N-ret0), dfs(cost+1, N-ret1))\n else:\n ret = max(ret0, ret1)\n return dfs(cost+1, N-ret)\n\nN = int(input())\nprint(dfs(0, N))', "N = int(input())\nif N<=999:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s252681696', 's569138899', 's924766207']
[3064.0, 3064.0, 2940.0]
[23.0, 17.0, 17.0]
[388, 376, 67]
p03327
u257541375
2,000
262,144
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.
['n = int(input())\n\nif n>=1000:\n print("ABD"+str(n-999).zfill(3))\nelse:\n print("ABC"+str(n).zfill(3))', 'n = int(input())\n\nif n>=1000:\n print("ABD")\nelse:\n print("ABC")']
['Wrong Answer', 'Accepted']
['s433796768', 's777318154']
[2940.0, 2940.0]
[17.0, 17.0]
[101, 65]
p03327
u257974487
2,000
262,144
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.
['n = int(input())\n\ndp = [10 ** 5]*(n+1)\ndp[0] = 0\nfor i in range(1, n+1):\n dp[i] = dp[i-1] + 1\n k = 6\n while i-k >= 0:\n dp[i] = min(dp[i], dp[i-k]+1)\n k *= 6\n k = 9\n while i-k >= 0:\n dp[i] = min(dp[i], dp[i-k]+1)\n k *= 9\nprint(dp[n])', 'n = int(input())\nif n <= 999:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s498429146', 's075998119']
[3064.0, 2940.0]
[24.0, 17.0]
[275, 69]
p03327
u259334183
2,000
262,144
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.
["rint('ABC' if int(input())<1000 else 'ABD')", "print('ABC' if int(input())<1000 else 'ABD')"]
['Runtime Error', 'Accepted']
['s427855168', 's703690621']
[3064.0, 3060.0]
[18.0, 19.0]
[43, 44]
p03327
u263226212
2,000
262,144
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.
["# -*- coding: utf-8 -*-\n\n# input\nN = int(input())\n\n# solve\nans = 'ABC' + str(N).zfill(3) if N < 1000 else 'ABD' + str(N - 999).zfill(3)\n\n# output\nprint(ans)\n", "# -*- coding: utf-8 -*-\n\n# input\nN = int(input())\n\n# solve\nans = 'ABC' if N < 1000 else 'ABD'\n\n# output\nprint(ans)\n"]
['Wrong Answer', 'Accepted']
['s663321759', 's692989848']
[3060.0, 2940.0]
[20.0, 17.0]
[157, 115]
p03327
u268792407
2,000
262,144
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.
['def f(n):\n if 1<=n<10:\n return "00"+str(n)\n elif n<100:\n return "0"+str(n)\n else:\n return str(n)\nn=int(input())\nif n<=999:\n print("ABC"+f(n))\nelse:\n print("ABD"+f(n-999))', 'n=int(input())\nif n<=999:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s582828773', 's517474828']
[3060.0, 3060.0]
[17.0, 19.0]
[184, 61]
p03327
u268793453
2,000
262,144
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.
["n = int(input())\n\nans = 'ABC' if n <= 999: else 'ABD'\n\nprint(ans)", "n = int(input())\n\nans = 'ABC' if n <= 999 else 'ABD'\n\nprint(ans)"]
['Runtime Error', 'Accepted']
['s144351185', 's138597472']
[2940.0, 2940.0]
[17.0, 18.0]
[65, 64]
p03327
u278430856
2,000
262,144
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.
["N = int(input())\nprint('ABC999')\n\n", "N = int(input())\nif N <= 999:\n if N < 10:\n print('ABC00'+str(N))\n elif N < 100:\n print('ABC0'+str(N))\n else:\n print('ABC'+str(N))\nelse:\n N = N - 999\n if N < 10:\n print('ABD00'+str(N))\n elif N < 100:\n print('ABD0'+str(N))\n else:\n print('ABD'+str(N))\n", "N = int(input())\nif N <= 999:\n if N < 10:\n print('ABC00'+str(N))\n elif N < 100:\n print('ABC0'+str(N))\n else:\n print('ABC'+str(N))\nelse:\n N = N - 999\n if N < 10:\n print('ABD00'+str(N))\n elif N < 100:\n print('ABD0'+str(N))\n else:\n print('ABD'+str(N))", "N = int(input())\nif N <= 999:\n if N < 10:\n print('ABC00'+str(N))\n elif N < 100:\n print('ABC0'+str(N))\n else:\n print('ABC'+str(N))\nelse:\n N = N - 999\n if N < 10:\n print('ABC00'+str(N))\n elif N < 100:\n print('ABC0'+str(N))\n else:\n print('ABC'+str(N))\n", "N = int(input())\nprint('ABC999')\nif N <= 999:\n if N < 10:\n print('ABC00'+str(N))\n elif N < 100:\n print('ABC0'+str(N))\n else:\n print('ABC'+str(N))\nelse:\n N = N - 999\n if N < 10:\n print('ABD00'+str(N))\n elif N < 100:\n print('ABD0'+str(N))\n else:\n print('ABD'+str(N))\n", "N = int(input())\nif N <= 999:\n if N < 10:\n print('ABC00'+str(N))\n elif N < 100:\n print('ABC0'+str(N))\n else:\n print('ABC'+str(N))\nelse:\n N = N - 999\n if N < 10:\n print('ABD00'+str(N))\n elif N < 100:\n print('ABD0'+str(N))\n else:\n print('ABD'+str(N))\n", 'print("ABC" if len(input().rstrip()) <= 3 else "ABD")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s125834051', 's282614060', 's354853392', 's357302239', 's479847408', 's981670128', 's820403214']
[2940.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0]
[34, 312, 311, 312, 328, 312, 53]
p03327
u278855471
2,000
262,144
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.
["N = int(input())\nif N >= 1000:\n N += 1\n print('ABD' + str(N)[1:])\nelse:\n print('ABC' + str(N))\n", "N = int(input())\nif N >= 1000:\n N += 1\n print('ABD')\nelse:\n print('ABC')\n"]
['Wrong Answer', 'Accepted']
['s034066722', 's698432443']
[3060.0, 2940.0]
[17.0, 18.0]
[98, 82]
p03327
u280016524
2,000
262,144
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.
['N=int(input())\nif(N<=999):\n print("ABC")\nif(N>=1000&N<=1998):\n print("ABD")', 'N=int(input())\nif(N<=999):\n print("ABC")\nif(N>=1000):\n print("ABD")']
['Wrong Answer', 'Accepted']
['s253227697', 's549082148']
[2940.0, 2940.0]
[17.0, 18.0]
[81, 73]
p03327
u282420844
2,000
262,144
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.
["if 1<= N < 1000:\n print('ABC')\n\n\nelif 1000 <= N <= 1998:\n print('ABD')", "N=input()\n\nif int(N) >= 1000:\n print('ABD')\n\n\nelse:\n print('ABC')"]
['Runtime Error', 'Accepted']
['s572849244', 's315335935']
[9088.0, 9096.0]
[21.0, 26.0]
[76, 71]
p03327
u284155299
2,000
262,144
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.
["if int(input())<999:\n print('ABC')\nelse:\n print('ABD')", "if int(input())<1000:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s476581240', 's338465023']
[2940.0, 2940.0]
[17.0, 17.0]
[60, 61]
p03327
u284854859
2,000
262,144
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.
["a=int(input())\nif a < = 999:\n print('ABC')\n else:\n print('ABD')", "# your code goes here\na=int(input())\n\nif a <= 999:\n\tprint('ABC')\nelse:\n\tprint('ABD')"]
['Runtime Error', 'Accepted']
['s748078086', 's966969536']
[2940.0, 2940.0]
[17.0, 17.0]
[65, 84]
p03327
u287431190
2,000
262,144
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.
["n = int(input())\nif n < 1000:\n nn = '%03d' % n\n print('ABC'+str(nn))\nelse:\n nn = '%03d' % (n - 999)\n print('ABD'+str(nn))", "n = int(input())\nif n < 1000:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s074305292', 's941947466']
[2940.0, 2940.0]
[17.0, 19.0]
[125, 65]
p03327
u287500079
2,000
262,144
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.
['\n\na = int(input())\n\nif a <= 99:\n print("ABC")\nelse:\n print("ABD")', '\n\na = int(input())\n\nif a <= 999:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s862967648', 's678901086']
[2940.0, 2940.0]
[17.0, 17.0]
[121, 122]
p03327
u287880059
2,000
262,144
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.
['n = int(input())\nprint("ABC" if 1000<n else "ABD")', 'n = int(input())\nprint("ABC" if n<1000 else "ABD")']
['Wrong Answer', 'Accepted']
['s370294119', 's287772691']
[2940.0, 2940.0]
[17.0, 17.0]
[50, 50]
p03327
u287920108
2,000
262,144
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.
["N = int(input())\nif N < 1000:\n print('ABC' + str(N // 100) + str(N // 10)[-1] + str(N // 1)[-1])\nelse:\n print('ABD' + str((N - 999) // 100) + str((N - 999) // 10)[-1] + str((N - 999) // 1)[-1])", "N = int(input())\nif N < 1000:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s552415150', 's839850005']
[2940.0, 2940.0]
[17.0, 17.0]
[199, 69]
p03327
u290187182
2,000
262,144
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.
['import sys\nimport copy\nimport math\nimport bisect\nimport pprint\nimport bisect\nfrom functools import reduce\nfrom copy import deepcopy\nfrom collections import deque\n\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\n\nif __name__ == \'__main__\':\n a = [int(i) for i in input().split()]\n\n if a[0] >999:\n print("ABD"+str(a[0]-999))\n else:\n print("ABC"+str(a[0]))\n\n', 'import sys\nimport copy\nimport math\nimport bisect\nimport pprint\nimport bisect\nfrom functools import reduce\nfrom copy import deepcopy\nfrom collections import deque\n\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\n\nif __name__ == \'__main__\':\n a = [int(i) for i in input().split()]\n\n if a[0] >999:\n print("ABD")\n else:\n print("ABC")\n\n']
['Wrong Answer', 'Accepted']
['s833731450', 's056292720']
[3828.0, 3828.0]
[26.0, 26.0]
[381, 357]
p03327
u291307667
2,000
262,144
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.
["N = input()\nN=int(N)\nif N>=1,N<=999:\n print('ABC')\nif N>=1000,N<=1998:\n print('ABD')", "N = int(input())\nif N>=1,N<=999:\n print('ABC')\nif N>=1000,N<=1998:\n print('ABD')", "N = int(input())\nif N>=1,N<=999:\n print('ABC')\nif N>=1000,N<=1998\n print('ABD')", "N = input()\nN=int(N)\nif N>=1 and N<=999:\n print('ABC')\nif N>=1000 and N<=1998:\n print('ABD')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s474641685', 's873761786', 's941235028', 's844628502']
[3060.0, 2940.0, 3188.0, 2940.0]
[18.0, 17.0, 18.0, 17.0]
[90, 86, 85, 98]
p03327
u294385082
2,000
262,144
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.
['n = int(input())\nif 1 <= n <= 999:\n print(ABC)\nelse:\n print(ABD)', 'n = input()\nif 1 <= n <= 999:\n print(ABC)\nelse:\n print(ABD)', 'n = int(input())\nif 1 <= n <= 999:\n print(n)\nelse:\n print(n-999)', 'n = input()\nif 1 <= n <= 999:\n print(n)\nelse:\n print(n-999)', 'n = int(input())\nif 1 <= n <= 999:\n print("ABC")\nelse:\n print("ABD")']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s022557021', 's093983533', 's598427535', 's723356401', 's092446941']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 18.0]
[66, 61, 66, 61, 70]
p03327
u296150111
2,000
262,144
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.
['a=int(input())\n\nif a>= 1000:\n print("ABD"):\nelse:\n print("ABC")', 'a=int(input())\n\nif a>= 1000:\n print("ABD")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s453830127', 's042888573']
[2940.0, 2940.0]
[17.0, 17.0]
[63, 62]
p03327
u298297089
2,000
262,144
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.
["N = int(input())\nS = 'ABD' if N >= 1000 else 'ABC'\nprint(S+str(N%1000+N//1000))", "N = int(input())\nS = 'ABD' if N >= 1000 else 'ABC'\nprint(S)"]
['Wrong Answer', 'Accepted']
['s202201903', 's205103216']
[2940.0, 2940.0]
[17.0, 17.0]
[79, 59]
p03327
u305732215
2,000
262,144
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.
["n = int(input())\nif n < 1000:\n print('ABD')\nelse:\n print('ABC')", "n = int(input())\nif n < 1000:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s312732931', 's344618892']
[2940.0, 2940.0]
[17.0, 17.0]
[65, 65]
p03327
u305965165
2,000
262,144
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.
['n = int(input())\n\nif n<1000:\n print("ABC"+str(n).zfill(3))\nelse:\n print("ABD"+str(n-999).zfill(3))', 'n = int(input())\n\nif n<1000:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s101490724', 's421049656']
[2940.0, 2940.0]
[18.0, 17.0]
[104, 68]
p03327
u309018392
2,000
262,144
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.
["n = int(input())\nprint('ABC') if n > 0 and n < 100 else print('ABD')", "n = int(input())\nprint('ABC') if n > 0 and n < 1000 else print('ABD')"]
['Wrong Answer', 'Accepted']
['s544890344', 's045011912']
[2940.0, 2940.0]
[17.0, 17.0]
[68, 69]
p03327
u313043608
2,000
262,144
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.
['n=int(input())\nif(n>=1000):\n print("ABD")\n else:\n print("ABC")', 'n=int(input())\nif(n>=1000):\n print("ABD")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s702347020', 's371416196']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 63]
p03327
u314089899
2,000
262,144
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.
['#99a\nN = int(input())\nif N >= 1100:\n ans = ["ABD",N-1000+1]\nelif 1100 > N >= 1010:\n ans = ["ABD0",N-1000+1]\nelif 1010 > N >= 1000:\n ans = ["ABD00",N-1000+1]\nelif 1000 > N >= 100:\n ans = ["ABC",N]\nelif 100 > N >= 10:\n ans = ["ABC0",N]\nelif 10 > N >= 1:\n ans = ["ABC00",N]\n\nprint(\'\'.join(map(str, ans)))', '#99a\nN = int(input())\nif N >= 1000:\n print("ABD")\nelse:\n print("ABC")']
['Wrong Answer', 'Accepted']
['s769850083', 's134223699']
[3064.0, 2940.0]
[17.0, 19.0]
[319, 71]
p03327
u315838013
2,000
262,144
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.
['import sys\n\nstdin = sys.stdin\n\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nns = lambda: stdin.readline()\n\nn = ni()\n\ndp = [99999999] * (n + 1)\ndp[0] = 0\nfor i in range(1, n + 1):\n dp[i] = dp[i - 1] + 1\n k = 6\n while i - k >= 0:\n dp[i] = min(dp[i], dp[i - k] + 1)\n k *= 6\n k = 9\n while i - k >= 0:\n dp[i] = min(dp[i], dp[i - k] + 1)\n k *= 9\nprint(dp[n])', 'import sys\nif __name__ == "__main__":\n N = int(input())\n buf = (N-1) // 999\n if N == 1 or buf == 0:\n print(\'ABC\')\n sys.exit()\n elif buf == 1:\n print(\'ABD\')\n sys.exit()\n else:\n print(\'ABE\')\n sys.exit()']
['Wrong Answer', 'Accepted']
['s125947909', 's557248934']
[3064.0, 2940.0]
[24.0, 17.0]
[427, 257]
p03327
u320256925
2,000
262,144
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.
['a, b = map(int, input().split())\n\nsa = b - a\neast = (1 + sa) * sa / 2\nsnow = int(east - b)\nprint(snow)', "N = int(input())\n\nif N <= 999:\n\tprint('ABC')\n\nif N > 999:\n\tprint('ABD')"]
['Runtime Error', 'Accepted']
['s706325058', 's532530674']
[2940.0, 2940.0]
[17.0, 17.0]
[102, 71]
p03327
u320763652
2,000
262,144
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.
['N = input()\n\ncnt = len(str(N))\n\nif cnt <= 3:\n print("ABC" + N)\nelse:\n print("ABD" + N[cnt-3:])\n\n\n\n', 'N = input()\ncnt = len(str(N))\n\nprint("ABD" + N[cnt-3:])', 'N = int(input())\n\nif N <= 999:\n print("ABC")\nelse:\n print("ABD")\n\n\n\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s715817014', 's923685954', 's640092022']
[3064.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[104, 55, 74]
p03327
u327248573
2,000
262,144
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.
["N = int(input())\nif N < 1000:\n print('ABC' + '{0:03d}'.format(N))\nelse:\n print('ABD' + '{0:03d}'.format(N - 999))", "N = int(input())\nif N < 1000:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s337964670', 's861015751']
[2940.0, 2940.0]
[17.0, 17.0]
[119, 69]
p03327
u327794110
2,000
262,144
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.
['N = int(input())\n\nif (N>999): print("ABD")\nelse; print("ABC")', 'N = int(input())\n\nif (N>999): print("ABD")\nelse: print("ABC")']
['Runtime Error', 'Accepted']
['s739393389', 's287341206']
[2940.0, 2940.0]
[17.0, 17.0]
[61, 61]
p03327
u328510800
2,000
262,144
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.
["print(['ABD', 'ABC'][int(input())//1000])", "print(['ABC', 'ABD'][int(input())//1000])"]
['Wrong Answer', 'Accepted']
['s072172394', 's579163560']
[3060.0, 3064.0]
[20.0, 17.0]
[41, 41]
p03327
u330114580
2,000
262,144
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.
['number = input()\n\nif number > 0 and number < 1000:\n print("ABC")\n\nif number >= 1000 and number <= 1998:\n print("ABD")', 'number = int(input())\n\nif number > 0 and number < 1000:\n print("ABC")\n\nif number >= 1000 and number <= 1998:\n print("ABD")']
['Runtime Error', 'Accepted']
['s844519892', 's815253973']
[2940.0, 2940.0]
[17.0, 17.0]
[123, 128]
p03327
u339503988
2,000
262,144
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.
['n=input()\nif len(n)==4:\n print("ABD"+str(int(n)-999).zfill(3))\nelse:\n print("ABC"+n.zfill(3))', 'n=input()\nif len(n)==4:\n print("ABD")\nelse:\n print("ABC")']
['Wrong Answer', 'Accepted']
['s948699396', 's726178184']
[2940.0, 2940.0]
[17.0, 18.0]
[95, 59]
p03327
u340781749
2,000
262,144
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.
["n = int(input())\nif n <= 999:\n print('ABC{:03d}'.format(n))\nelse:\n print('ABD{:03d}'.format(n - 999))\n", "n = int(input())\nif n <= 999:\n print('ABC')\nelse:\n print('ABD')\n"]
['Wrong Answer', 'Accepted']
['s833348458', 's776572680']
[2940.0, 2940.0]
[17.0, 17.0]
[108, 70]
p03327
u340947941
2,000
262,144
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.
['N=int(input())\n\nif N<1000:\n print("ABC{:03d}".format(N))\nelif N>=1000:\n print("ABD{:03d}".format(N-999))', 'N=int(input())\n\nif N<1000:\n print("ABC")\nelif N>=1000:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s651538191', 's953475377']
[2940.0, 2940.0]
[17.0, 17.0]
[110, 74]
p03327
u348868667
2,000
262,144
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.
['N = input()\nif N >= 999:\n print("ABC")\nelse:\n print("ABD")', 'N = int(input())\nif N <= 999:\n print("ABC")\nelse:\n print("ABD")']
['Runtime Error', 'Accepted']
['s811665966', 's557046875']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 69]
p03327
u350248178
2,000
262,144
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.
['N=int(input())\n\nif N<1000:\n print(“ABC”)\nelse:\n print(“ABD”)', 'N=int(input())\n\nif N<1000:\n print(“ABC”)\nelse:\n print(“ABD”)', 'N=int(input())\nif N<1000:\n print("ABC")\nelse:\n print("ABD")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s223034530', 's520765200', 's817057397']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[74, 74, 65]
p03327
u351399674
2,000
262,144
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.
['N = map(int(input().split()))\nif N < 1000:\n print("ABC")\nelse:\n print("ABD")\n\n', 'N = map(int,input().split())\n\nif N >=1000:\n print("ABD")\n\nelse:\n print("ABC")', 'N = int(input())\n\nif N >=1000:\n print("ABD")\n\nelse:\n print("ABC")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s122583772', 's924826013', 's587705473']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 19.0]
[84, 79, 67]
p03327
u359787029
2,000
262,144
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.
['n = int(input())\nres = ""\n\nif(n < 1000):\n res = "ABC"\nelse:\n res = "ABD"', 'n = int(input())\nres = ""\n\nif(n < 1000):\n res = "ABC"\nelse:\n res = "ABD"\n\nprint(res)']
['Wrong Answer', 'Accepted']
['s940513006', 's844666718']
[2940.0, 2940.0]
[17.0, 17.0]
[78, 90]
p03327
u361841553
2,000
262,144
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.
["a, b = input().split(' ')\n\nc = int(b) - int(a)\n\nprint(int(a) - (c - 1))\n", "n = input()\n\nif int(n) < 1000:\n print('ABC')\nelse:\n print('ABD')\n"]
['Runtime Error', 'Accepted']
['s740894306', 's574755081']
[2940.0, 2940.0]
[17.0, 17.0]
[72, 71]
p03327
u366959492
2,000
262,144
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.
['n=int(input())\na=n//999\nif a==0:\n print("ABC")\nelse:\n print("ABD")\n', 'n=int(input())\na=n//1000\nif a==0:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s625046317', 's695399843']
[3060.0, 2940.0]
[19.0, 17.0]
[73, 73]
p03327
u368780724
2,000
262,144
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.
['a,b =map(int,input().split())\ns = b-a\ns = int(s*(s+1)/2-b)\nprint(s)', "num = input('>> ')\nnum = int(num)\nif num <= 999 and num >= 0 :\n print('ABC')\nelif num >= 1000 and num <= 1998 :\n print('ABD')\nelse:\n print('条件が違います')", 'n,c = [int(i) for i in input().split()]\nd = [] \nfor i in range(c):\n d.append(list(map(int, input().split())))\ncolor = []\nfor i in range(n):\n color.append(list(map(int, input().split())))\nfor i in range(n):\n for j in range(n):\n color[i][j] -= 1\ndofc = [[0 for i in range(3)] for j in range(c)]\nfor t in range(3):\n for a in range(c):\n for l in range(n):\n for row in range(n):\n dofc[a][(l+row)%3] += d[a][color[row][l]]\nD = dofc[0][0]+dofc[1][1]+dofc[2][2]\nfor c0 in range (c):\n for c1 in range (c):\n if c1 == c0:\n continue\n for c2 in range (c):\n if c2 == c1 or c2 == c0:\n continue\n D = min(D,dofc[c0][0]+dofc[c1][1]+dofc[c2][2])\nprint(D)', "num = input('>> ')\nnum = int(num)\nif num <= 999 and num >= 0 :\n print('abc')\nelif num >= 1000 and num <= 1998 :\n print('abd')\nelse:\n print('条件が違います')", "num = input()\nnum = int(num)\nif num <= 999 and num >= 0 :\n print('ABC')\nelif num >= 1000 and num <= 1998 :\n print('ABD')"]
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s362963145', 's443361913', 's594023834', 's596528453', 's217415702']
[2940.0, 2940.0, 3064.0, 2940.0, 2940.0]
[17.0, 17.0, 19.0, 17.0, 17.0]
[67, 172, 752, 172, 126]
p03327
u371409687
2,000
262,144
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.
['x=int(input())\nif x<1000:\n print("ABC"+str(x))\nelse:print("ABD"+str(x-999).zfill(3))', 'x=int(input())\nif x<1000:\n print("ABC")\nelse:print("ABD")']
['Wrong Answer', 'Accepted']
['s202292079', 's634931645']
[2940.0, 2940.0]
[17.0, 17.0]
[85, 58]
p03327
u371467115
2,000
262,144
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.
['a,b=map(int,input().split())\nn=0\nfor i in range(1,a-b+1):\n n+=i\nprint(n-b)\n', 'n=int(input())\nif n<1000:\n print("ABC")\nelse:\n print("ABD")']
['Runtime Error', 'Accepted']
['s175076866', 's429755635']
[2940.0, 2940.0]
[18.0, 18.0]
[76, 65]
p03327
u374802266
2,000
262,144
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.
['a=int(input())\nif a<=1000:\n print("ABD"+(a-999))\nelse:\n print("ABC"+a)', 'a=int(input())\nif a>=1000:\n print("ABD")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s293159327', 's309171691']
[2940.0, 2940.0]
[17.0, 17.0]
[76, 66]
p03327
u375494588
2,000
262,144
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.
['a = int(input())\nif a>=999:\n print("ABD")\n else:\n print("ABC")\n\n', "a,b = [int(i) for i in input().split(' ')]\nn=b-a#13-8=5\nN=n-1#5-1=4\nx=(1/2*N)*(N+1)#2*5=10\ny= x - a#10-8=2\nprint(int(y))", 'a = int(input())\nif a>=1000:\n print("ABD")\nelse:\n print("ABC") \n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s821198229', 's967895994', 's390527059']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[70, 120, 72]
p03327
u375500286
2,000
262,144
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.
['a=map(int,input().split())\nprint("ABD" if a<1000 else "ABC")', 'a=map(int,input().split())\nprint("ABC" if a<1000 else "ABD")', 'a=int(input())\nprint("ABC" if a<1000 else "ABD")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s366909392', 's776976903', 's123699728']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[60, 60, 48]
p03327
u378235715
2,000
262,144
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.
['c = 0\na,b = map(int,input())\nfor i in range(1,a-b):\n c = c + i\nprint(a-c)\n', 'c = 0\nA = input()\nB = A.split(" ")\na,b = int(B[0]),int(B[1])\nfor i in range(1,a-b):\n c = c + i\nprint(c - a)\n', 'i = int(input())\nif i <= 999:\n print("ABC")\nelse:\n print("ABD")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s444883591', 's517380560', 's643093753']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[77, 111, 69]
p03327
u380524497
2,000
262,144
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.
["n = int(input())\nif n > 999:\n num = n-999\n print('ABD{:03}'.format(num))\n\nelse:\n print('ABC{:03}'.format(n))\n\n", "n = int(input())\nif n > 999:\n print('ABD')\nelse:\n print('ABC')"]
['Wrong Answer', 'Accepted']
['s754942178', 's567409197']
[2940.0, 2940.0]
[17.0, 18.0]
[119, 68]
p03327
u383508661
2,000
262,144
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.
['n=int(input())\nif n<=999:\n print("ABD")\nelse:\n print("ABD")\n\n', 'n=int(input())\nif n<=999:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s400679993', 's645861206']
[2940.0, 3064.0]
[17.0, 17.0]
[63, 61]
p03327
u384679440
2,000
262,144
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.
['a, b = map(int, input().split())\ndif = b - a\nsum = int(dif / 2 * (1 + dif))\nprint(sum - b)', 'N = int(input())\nif N > 999:\n print("ABD")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s025018562', 's981577787']
[2940.0, 2940.0]
[17.0, 17.0]
[90, 64]