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
u938594975
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()]\nn = b-a-1\nprint(n*(n+1)/2-a)', 'a,b = [int(i) for i in input().split()]\nn = b-a-1\nprint(int(n*(n+1)/2-a))', "N = int(input())\nif N < 1000:\n print('ABC')\nelif N >= 1000:\n print('ABD')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s721035778', 's813434999', 's865714229']
[2940.0, 3060.0, 2940.0]
[18.0, 18.0, 17.0]
[68, 73, 79]
p03327
u945181840
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']
['s454278364', 's503067568']
[3188.0, 2940.0]
[18.0, 17.0]
[112, 70]
p03327
u945419374
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(n*(n+1)//2-b)\n\n\n\n\t\n\t', 'n=int(input())\nif 0<n<1000:\n\tprint("ABC")\nelse:\n\tprint("ABD")\t\n\t']
['Runtime Error', 'Accepted']
['s118834021', 's033541298']
[2940.0, 2940.0]
[18.0, 17.0]
[61, 64]
p03327
u956547804
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))", "n=int(input())\nif n<1000:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s307630168', 's128530536']
[2940.0, 3060.0]
[17.0, 19.0]
[79, 65]
p03327
u957198490
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).zfill(3))\nelse:\n print('ABD' + str(N-999).zfill(3))", "N = int(input())\nif N <= 999:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Accepted']
['s695608198', 's913670249']
[3060.0, 2940.0]
[19.0, 17.0]
[109, 69]
p03327
u960513073
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("ABC")\nelse:\n print("ABD")', 'n = int(input())\nif n < 1000:\n print("ABC")\nelse:\n print("ABD")']
['Runtime Error', 'Accepted']
['s156469438', 's815596685']
[2940.0, 2940.0]
[17.0, 17.0]
[60, 65]
p03327
u962829271
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.
['line = input()\n\nnum = int(line)\n\nif num < 1000:\n print("ABC" + str(num))\nelse:\n print("ABD" + str(num - 1000))', 'line = input()\n\nnum = int(line)\n\nif line < 1000:\n print("ABC")\nelse:\n print("ABD")', 'line = input()\n\nnum = int(line)\n\nif num < 1000:\n print("ABC")\nelse:\n print("ABD")\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s215792734', 's403837826', 's159346448']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[116, 88, 88]
p03327
u963903527
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\na, b = input().split(" ")\na = int(a)\nb = int(b)\n\nc = b - a\ns = sum(list(np.arange(c)))\nprint(s - a)\n\n', 'a = input()\na = int(a)\n\nif a > 999:\n print("ABD")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s660745792', 's625034805']
[14444.0, 2940.0]
[276.0, 17.0]
[120, 75]
p03327
u971237642
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\nn = int(input())\n\npref = ""\nif n <= 999:\n pref = "ABC"\nelse:\n pref = "ABD"\n n = n - 999\n\nprint(pref + str(n).zfill(3))\n', '# -*- coding: utf-8 -*-\n\nn = int(input())\n\npref = ""\nif n <= 999:\n pref = "ABC"\nelse:\n pref = "ABD"\n\nprint(pref)\n']
['Wrong Answer', 'Accepted']
['s682948965', 's940948457']
[3064.0, 2940.0]
[17.0, 17.0]
[153, 119]
p03327
u972658925
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 0 < n <= 999:\n print("ABC" + str(n).zfill(3))\nelse:\n print("ABD" + str(n-999).zfill(3))', 'n = int(input())\nif 0 < n <= 999:\n print("ABC")\nelse:\n print("ABD")']
['Wrong Answer', 'Accepted']
['s841287238', 's112518761']
[2940.0, 2940.0]
[17.0, 17.0]
[113, 73]
p03327
u974935538
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())\nk=b-a\nprint(((1+k)*k)//2-b)\n', 'N = int(input())\nif N<1000:\n print("ABC")\nelif N>=1000:\n print("ABD")']
['Runtime Error', 'Accepted']
['s815520883', 's972395245']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 75]
p03327
u977855674
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())\nisD = False\nif 1000 <= a:\n a = a % 1000 + 1\n isD = True\nprint("{}{}".format("ABD"if isD else "ABC", a))', 'print("ABD" if len(str(input())) == 4 else "ABC")']
['Wrong Answer', 'Accepted']
['s945600471', 's930671179']
[2940.0, 2940.0]
[18.0, 18.0]
[126, 49]
p03327
u978167553
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('ABC' if int(input()) < 999 else 'ABD')", "print('ABC' if int(input()) <= 999 else 'ABD')"]
['Wrong Answer', 'Accepted']
['s086467833', 's214877994']
[9148.0, 9024.0]
[27.0, 31.0]
[45, 46]
p03327
u982762220
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 = 'ABC' if n < 1000 else 'ABD'\nflag = n >= 1000\ntmp = n%1000\nif tmp < 100:\n s += '0'\nif tmp < 10:\n s += '0'\nprint(s + str(n%1000 + flag))\n", "n = int(input())\n\nprint('ABC' if n < 1000 else 'ABD')"]
['Wrong Answer', 'Accepted']
['s728665790', 's603247258']
[2940.0, 2940.0]
[17.0, 17.0]
[164, 53]
p03327
u990849962
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.
['\nN, C = map(int, input().split()) \n\nD = [[0 for i in range(C)] for j in range(C)]\nc = [[0 for i in range(N)] for j in range(N)]\n# iwakan = [[[0 for i in range(N)] for j in range(N)] for k in range(C)]\n\nfor i in range(C):\n D[i] = list(map(int, input().split()))\n\nfor i in range(N):\n c[i] = list(map(int, input().split()))\n\n\n\n# for j in range(N):\n# for k in range(N):\n\n\n\n\n# t1 = time.time()\n\n\nnumOfColors = [[0 for i in range(C)] for j in range(3)]\nfor i in range(N):\n for j in range(N):\n if (i + j) % 3 == 0:\n numOfColors[0][c[i][j] - 1] = numOfColors[0][c[i][j] - 1] + 1\n if (i + j) % 3 == 1:\n numOfColors[1][c[i][j] - 1] = numOfColors[1][c[i][j] - 1] + 1\n if (i + j) % 3 == 2:\n numOfColors[2][c[i][j] - 1] = numOfColors[2][c[i][j] - 1] + 1\n\niwakan = [[0 for i in range(C)] for j in range(3)]\nfor i in range(3):\n for j in range(C):\n for a in range(C):\n iwakan[i][j] = iwakan[i][j] + numOfColors[i][a] * D[a][j]\n\n# t2 = time.time()\n\nsum_min = float("inf")\nfor i in range(C):\n for j in range(C):\n for k in range(C):\n if (i == j) or (j == k) or (k == i):\n pass\n else:\n sum_tmp = iwakan[0][i] + iwakan[1][j] + iwakan[2][k]\n if sum_min > sum_tmp:\n sum_min = sum_tmp\n\n# t3 = time.time()\n\nprint(sum_min)\n\n# elapsed_time1 = t2 - t1\n# elapsed_time2 = t3 - t2\n# print(f\'time1: {elapsed_time1}\')\n# print(f\'time2: {elapsed_time2}\')\n', 'n = int(input())\n\nif n <= 999:\n print("ABC")\nelse:\n print("ABD")\n']
['Runtime Error', 'Accepted']
['s396201378', 's965458147']
[3188.0, 2940.0]
[18.0, 17.0]
[2216, 71]
p03327
u992736202
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 >= 0:\n print "ABD"\nelse:\n print "ABC"', 'a = int(input())\nif a-1000 >= 0:\n print("ABD")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s095327073', 's704016826']
[2940.0, 2940.0]
[17.0, 18.0]
[66, 68]
p03327
u992910889
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',N)\nelse:\n print('ABD',N-999)", "N=int(input())\nif N<1000:\n print('ABC',N)\nelif:\n print('ABD',N-999)", "N=int(input())\nif N<1000:\n print('ABC')\nelse:\n print('ABD')"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s099897676', 's209531033', 's724009387']
[3064.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[73, 73, 65]
p03327
u993461026
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"+str(N) if N < 1000 else "ABD"+str(N-1000))', 'N = int(input())\nprint("ABC" if N < 1000 else "ABD")']
['Wrong Answer', 'Accepted']
['s117891367', 's323132744']
[2940.0, 2940.0]
[17.0, 17.0]
[71, 52]
p03327
u996749146
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# A - ABD\n\n# A_ABD.py\n\nN = int(input())\n\nC_or_D = (N-1) // 999\n\n\nname = ""\n\nif C_or_D == 0:\n name += "ABC"\n n = N\nelif C_or_D == 1:\n name += "ABD"\n n = \'{0:03d}\'.format(N - 999)\n\nname += str(n)\n\nprint(name)\n', '\n# A - ABD\n\n# A_ABD.py\n\nN = int(input())\n\nC_or_D = (N-1) // 999\n\n\nname = ""\n\nif C_or_D == 0:\n name += "ABC"\n #n = N\nelif C_or_D == 1:\n name += "ABD"\n #n = \'{0:03d}\'.format(N - 999)\n\nname += str(n)\n\nprint(name)\n', '\n# A - ABD\n\n# A_ABD.py\n\nN = int(input())\n\nC_or_D = (N-1) // 999\n\n\nname = ""\n\nif C_or_D == 0:\n name += "ABC"\n #n = N\nelif C_or_D == 1:\n name += "ABD"\n #n = \'{0:03d}\'.format(N - 999)\n\n#ame += str(n)\n\nprint(name)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s010612131', 's418845009', 's769563343']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[276, 278, 278]
p03328
u003501233
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nprint(abs((b-a)*(b-a+1)/2-b))', 'a.b=map(int,input().split())\nprint((b-a)*(b-a+1)/2-b)', 'a,b=map(int,input().split())\nprint((b-a)*(b-a+1)/2-b)', 'a,b=map(int,input().split())\nprint(((b-a)**2-a-b)//2)']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s010047022', 's662227453', 's773815579', 's318698460']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 20.0, 18.0]
[58, 53, 53, 53]
p03328
u006657459
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
["N = int(input())\nprint('ABC') if N / 999 <= 1 else print('ABD')", "a, b = input().split(' ')\ndiff = int(b) - int(a)\na_orig = sum([i for i in range(1, diff)])\nsnow = a_orig - a\nprint(snow)", 'a, b = map(int, input().split())\nd = b - a\nprint(d * (d + 1) // 2 - b)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s485574689', 's966715876', 's234604654']
[2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[63, 120, 70]
p03328
u010777300
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\ns=0\nfor i in range(1,b-a+1):\n s=s+i\nprint(s-a)', 'a,b=map(int,input().split())\ns=0\nfor i in range(b-a+1):\n s=s+i\nprint(s-a)', 'a,b=map(int,input().split())\ns=0\nfor i in range(1,b-a):\n s=s+i\nprint(s-a)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s386918428', 's936608951', 's046018782']
[9068.0, 9068.0, 9164.0]
[26.0, 25.0, 30.0]
[76, 74, 74]
p03328
u013408661
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['SUM=[0]\nsum=0\nfor i in range(1000):\n sum+=i\n SUM.append(sum)\na,b=map(int,input().split())\nprint(SUM[b-a]-b)', 'SUM=[0]\nsum=0\nfor i in range(1,1000):\n sum+=i\n SUM.append(sum)\na,b=map(int,input().split())\nprint(SUM[b-a]-b)']
['Wrong Answer', 'Accepted']
['s013532149', 's417981570']
[3060.0, 3060.0]
[19.0, 17.0]
[109, 111]
p03328
u013582384
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['# -*- coding: utf-8 -*\na_b = input().split()\na = int(a_b[0])\nb = int(a_b[1])\nn = b - a\n\nh = (n - 1) * n / 2 - a\n', '# -*- coding: utf-8 -*-\na_b = input().split()\na = int(a_b[0])\nb = int(a_b[1])\nn = b - a\n\nh = (n - 1) * n / 2 - a\n\nprint(int(h))\n']
['Wrong Answer', 'Accepted']
['s319860076', 's386050966']
[2940.0, 2940.0]
[17.0, 18.0]
[112, 128]
p03328
u021548497
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input())\nprint((b-a)*(b-a-1)//2-a)', 'a, b = map(int, input().split())\nprint((b-a)*(b-a-1)//2-a)']
['Runtime Error', 'Accepted']
['s233420328', 's942368420']
[3060.0, 2940.0]
[19.0, 17.0]
[50, 58]
p03328
u023229441
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nn=b-a\nprint(n*(n+1)/2-b)', 'a,b=map(int,input().split())\nn=b-a\nprint(int(n*(n+1)/2-b))\n']
['Wrong Answer', 'Accepted']
['s334310221', 's331000571']
[2940.0, 2940.0]
[17.0, 18.0]
[53, 59]
p03328
u050121913
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['x = list(map(int,input().split( )))\nz = x[1]-x[0]\nt = 0\nfor s in range(z+2):\n t += s\n \nprint(t-x[1])', 'x,y = map(int,input( ))\nz = y-x\nt = 0\nfor s in range(z+1):\n t += s\n \nprint(t-y)', 'x = list(map(int,input().split( )))\nz = x[1]-x[0]\nt = 0\nfor s in range(z+1):\n t += s\n \nprint(t-x[1])']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s192761141', 's487603326', 's845699152']
[2940.0, 3064.0, 2940.0]
[17.0, 19.0, 17.0]
[106, 85, 106]
p03328
u050698451
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nd = b - a\nprint((d*(d+1)/2)-b)', 'a, b = map(int, input().split())\nd = b - a\n\ndef memorize(f):\n\ttable = []\n\tdef func(*args):\n\t\tif not args in table:\n\t\t\ttable[args] = f(*args)\n\t\treturn table[args]\n\treturn func\n\n@memorize\ndef s(n):\n\tif n <= 1:\n\t\treturn 1\n\telse:\n\t\treturn s(n-1)+n\nprint(s(d-1)-a)', 'a, b = map(int, input().split())\nd = b - a\nprint(int((d*(d+1)/2)-b))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s832992155', 's940918396', 's706896542']
[2940.0, 3816.0, 2940.0]
[17.0, 56.0, 18.0]
[63, 259, 68]
p03328
u079022116
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int,input().split())\nprint(((1+(b-a))*(b-a))//2)\n', 'a,b = map(int,input().split())\nprint((1+(b-a))*(b-a))', 'a,b = map(int,input().split())\nprint(((1+(b-a))*(b-a))//2-b)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s847862851', 's955364047', 's090360706']
[2940.0, 3064.0, 2940.0]
[17.0, 17.0, 17.0]
[59, 53, 61]
p03328
u094565093
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nn=b-a-1\nprint(int(h-a))', 'a,b=map(int,input().split())\nn=b-a-1\nh=n*(n+1)/2\nprint(h-a)', 'a,b=map(int,input().split())\nn=b-a-1\nh=n*(n+1)/2\nprint(int(h-a))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s318850817', 's736267727', 's968032929']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 19.0]
[52, 59, 64]
p03328
u102126195
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int,input().split())\nx =0\nans =0\nfor i in range(x):\n ans = ans + 1\n\nprint(ans -a)', 'a, b = map(int,input().split())\nx =b -a\n\nans =0\nfor i in range(x):\n ans = ans + 1\n\nprint(ans -a)\n', 'a, b = map(int,input().split())\nx =b -a -1\nans = (1+x)*x//2\n\nprint(ans -a)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s461532295', 's693105133', 's997132645']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[93, 98, 75]
p03328
u111365362
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int,input().split())\ndiff = b - a\nans = diff * (diff+1) // 2\nans -= b', 'a,b = map(int,input().split())\ndiff = b - a\nans = diff * (diff+1) // 2\nans -= b\nprint(ans)']
['Wrong Answer', 'Accepted']
['s439562837', 's809807837']
[2940.0, 2940.0]
[18.0, 17.0]
[79, 90]
p03328
u113971909
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input())\ni=b-a\nprint(i*(i+1)//2-b)', 'a,b=map(int,input().split())\ni=b-a\nprint(i*(i+1)//2-b)\n']
['Runtime Error', 'Accepted']
['s742628934', 's234321461']
[2940.0, 2940.0]
[17.0, 17.0]
[46, 55]
p03328
u114954806
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int,input().split())\nheight = 0\nfor i in range(1,1000):\n height += i\n if b - a >= i:\n print(height - b)\n break', 'a,b = map(int,input().split())\nheight = 0\nfor i in range(1,b):\n height += i\n if b - a == i:\n print(height - i-a)\n break']
['Wrong Answer', 'Accepted']
['s215387342', 's767646910']
[2940.0, 2940.0]
[17.0, 17.0]
[140, 139]
p03328
u116233709
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nx=b-a\nams=0\nfor i in range(x+1):\n ans+=i\nprint(ans-b) \n', 'a,b=map(int,input().split())\nx=b-a\nans=0\nfor i in range(x+1):\n ans+=i\nprint(ans-b) \n']
['Runtime Error', 'Accepted']
['s845123555', 's703007460']
[2940.0, 2940.0]
[17.0, 17.0]
[90, 90]
p03328
u122195031
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int,input().split())\ndf = b-a\nnums = []\ncnt = 0\nfor i in range(1,1000):\n cnt += i\n nums.append(cnt)\n if nums[i] - nums[i-1] == df:\n print(nums[i] - b)\n exit()', 'a,b = map(int,input().split())\ndf = b-a\nnums = []\ncnt = 0\nfor i in range(1,1000):\n cnt += i\n nums.append(cnt)\n\nfor i in nums[1:]:\n if i - (i-1) == df:\n print(i - b)\n break', 'x,y = map(int,input().split())\nh=y-x\na=0\nfor i in range(h-1):\n a+=i+1\nprint(a-x) ']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s722087550', 's833703916', 's584621415']
[3060.0, 3060.0, 2940.0]
[17.0, 18.0, 17.0]
[191, 194, 84]
p03328
u127499732
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nprint((b-a-1)*(b-a-2)/2)', 'a,b=map(int,input().split())\nprint((b-a-1)(b-a-2)/2)', 'a,b=map(int,input().split())\nprint((b-a)*(b-a+1)//2-b)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s037203038', 's201204616', 's424574011']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[53, 52, 54]
p03328
u136869985
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nprint((b-a)*(1+b-a)//2-b)…', 'a,b=map(int,input().split())\nprint((b-a)*(1+b-a)//2-b)']
['Runtime Error', 'Accepted']
['s918442240', 's764366228']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 54]
p03328
u139115460
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = (int(i) for i in input().split()) \nc = b-a\nnum = 0\nfor i in range(c):\n num += i\n\nprint(a-num)', 'a, b = input().split()\na = int(a)\nb = int(b)\nc = b-a\nnum = 0\nfor i in range(c):\n num += i\n\nprint(a-num)', 'a, b = (int(i) for i in input().split()) \nc = b-a\nnum = 0\nfor i in range(c):\n num += i\n\nprint(num-a)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s494910003', 's497371279', 's490268966']
[2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[105, 107, 105]
p03328
u146575240
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['# B - Stone Monument\nN, M = map(int,input().split())\n\ntmp= (M-N)*( M-N+1)/2\n\nans( tmp-N)', '# B - Stone Monument\na,b =map(int,input().split())\n\ntmp= (b-a)*( b-a-1)/2\n\nprint( int(tmp-a))']
['Runtime Error', 'Accepted']
['s783025311', 's255431914']
[2940.0, 2940.0]
[17.0, 17.0]
[88, 94]
p03328
u161373155
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
["#coding : utf-8\n\nif __name__ == '__main__':\n\n a,b = list(map(int,input().split()))\n tower = []\n for i in range(1000):\n if i == 0:\n tower.append(1)\n else:\n tower.append(tower[i-1]+i+1)\n d = []\n for i in range(999):\n d.append(tower[i+1]-tower[i])\n for i in range(999):\n if a-b == d[i]:\n print(tower[i]-a)\n", "#coding : utf-8\n\nif __name__ == '__main__':\n\n a,b = list(map(int,input().split()))\n tower = []\n for i in range(1000):\n if i == 0:\n tower.append(1)\n else:\n tower.append(tower[i-1]+i+1)\n d = []\n for i in range(999):\n d.append(tower[i+1]-tower[i])\n for i in range(999):\n if b-a == d[i]:\n print(tower[i]-a)\n"]
['Wrong Answer', 'Accepted']
['s485476881', 's214528859']
[3060.0, 3060.0]
[18.0, 18.0]
[382, 382]
p03328
u163543660
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nprint(()(b-a)*(b-a+1)/2)-b)', 'a, b = map(int, input().split())\nn = b - a\nprint(int(n*(n+1)/2-b))']
['Runtime Error', 'Accepted']
['s034053849', 's820218714']
[2940.0, 2940.0]
[17.0, 17.0]
[60, 66]
p03328
u166696759
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nA = list(range(1, 1000))\nprint(A)\nfor i in range(1 ,999):\n A[i] += A[i-1]\nimport numpy as np \nA = np.array(A)\nres = 1\nwhile True:\n A = A - 1\n if a in A and b in A:\n break\n else:\n res += 1\nprint(res)\n', 'a, b = map(int, input().split())\nx = b -a\nprint(x*(x+1)//2-b)']
['Wrong Answer', 'Accepted']
['s979474311', 's549121647']
[14436.0, 2940.0]
[2109.0, 18.0]
[258, 61]
p03328
u167647458
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nx = [i *(i + 1) // 2 for i in range(1, 1000)]\nfor i in x:\n if a < i < b and i - a == b - i:\n print(i - a)\n break\n', 'a, b = map(int, input().split())\nx = [i *(i + 1) // 2 for i in range(1, 1000)]\nfor i in range(999):\n if a < x[i] and x[i] - a == x[i+1] - b:\n print(x[i] - a)\n break\n']
['Wrong Answer', 'Accepted']
['s312584754', 's163291793']
[3060.0, 3060.0]
[17.0, 18.0]
[165, 184]
p03328
u167908302
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['#coding:utf-8\n\na, b = map(int, input().split())\nn = b-a\n\nprint((n*(n+1))/2 - b)', '#coding:utf-8\n\na, b = map(int, input().split())\nn = b-a\n\nprint((n*(n+1))//2 - b)']
['Wrong Answer', 'Accepted']
['s972843012', 's236062228']
[2940.0, 2940.0]
[17.0, 17.0]
[79, 80]
p03328
u223904637
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['x,y = map(int,input().split())\na=y-x\nb=a*(a-1)/2\nprint(b-x)', 'x,y = map(int,input().split())\na=y-x\nb=a*(a-1)/2\nprint(round(b-x))\n']
['Wrong Answer', 'Accepted']
['s480584160', 's463119488']
[2940.0, 2940.0]
[18.0, 18.0]
[59, 67]
p03328
u224983328
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = (int(i) for i in input().split())\n\nlength = b - a\ncount = length - 1\n\nfor j in range(length):\n a -= count\n print(a)\n if a =< 0:\n print(1 - a)\n break\n else:\n count -= 1\n print(count)', 'a,b = (int(i) for i in input().split())\n\nlength = b - a\ncount = length - 1\n\nfor j in range(length):\n a -= count\n print(a)\n if a <= 0:\n break\n else:\n count -= 1\n ', 'a,b = (int(i) for i in input().split())\n\nlength = b - a\nresult = 0\n\nfor j in range(length):\n result += j\n \nprint(result + length - b)\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s860604413', 's961612011', 's132419727']
[2940.0, 3188.0, 2940.0]
[18.0, 32.0, 17.0]
[203, 174, 136]
p03328
u226155577
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nk = b-a\nprint(k*(k+1)//2-a)', 'a, b = map(int, input().split())\nk = b-a\nprint(k*(k-1)//2-a)\n\n']
['Wrong Answer', 'Accepted']
['s512672954', 's921403354']
[2940.0, 2940.0]
[18.0, 18.0]
[60, 62]
p03328
u226191225
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nif b != 100:\n print(b * (100 ** a))\nelse:\n print((b+1) * (100 ** a))', 'a, b = map(int, input().split())\n\nhigh = (b-a+1)*(b-a)//2\nprint(high-b)']
['Wrong Answer', 'Accepted']
['s565389773', 's370153355']
[4608.0, 2940.0]
[2104.0, 17.0]
[107, 71]
p03328
u229213815
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split(" "))\n\ndelta = b - a\n\nhigh_east = (1 + delta) * delta // 2\nsnow = high_east - b\n\nprint(b)', 'a, b = map(int, input().split(" "))\n\ndelta = b - a\n\nhigh_east = (1 + delta) * delta // 2\nsnow = high_east - b\n\nprint(snow)']
['Wrong Answer', 'Accepted']
['s448004112', 's610190026']
[2940.0, 2940.0]
[17.0, 17.0]
[119, 122]
p03328
u240733052
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['l = int(input().split())\n\na = int(l[0])\nb = int(l[1])\n\nn = b - a\n\nh = n * (n + 1) // 2\n\nprint(h-b)', 'l = input().split()\n\na = int(l[0])\nb = int(l[1])\n\nn = b - a\n\nh = n * (n + 1) // 2\n\nprint(h-b)']
['Runtime Error', 'Accepted']
['s863339970', 's451290564']
[2940.0, 3316.0]
[17.0, 19.0]
[98, 93]
p03328
u244118793
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['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 = int(input())\nb = int(input())\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+1):\n souwa += i\n \nx = souwa - b\n \nprint(x)']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s126679072', 's284988062', 's748582263', 's937734879']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 18.0]
[142, 113, 170, 144]
p03328
u244836567
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=input().split()\na=int(a)\nb=int(b)\nprint((b-a)*(b-a-1)/2-b)', 'a,b=input().split()\na=int(a)\nb=int(b)\nprint((b-a)*(b-a-1)/2)', 'a,b=input().split()\na=int(a)\nb=int(b)\nprint((b-a)*(b-a-1)/2-a)', 'a,b=input().split()\na=int(a)\nb=int(b)\nprint(int((b-a)*(b-a-1)/2-a))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s007037757', 's731130109', 's947079504', 's440010092']
[9164.0, 9164.0, 9024.0, 9092.0]
[29.0, 27.0, 29.0, 25.0]
[62, 60, 62, 67]
p03328
u245870380
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nprint((b-a)*(b-a+1)/2-b)', 'a, b = map(int, input().split())\nprint((b-a)*(b-a+1)//2-b)']
['Wrong Answer', 'Accepted']
['s185155759', 's287688305']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 58]
p03328
u252828980
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int,input())\nprint((b-a)*(b-a+1)//2-b)', 'a,b = map(int,input().split())\nprint((b-a)*(b-a+1)//2-b)']
['Runtime Error', 'Accepted']
['s601467807', 's443656035']
[3060.0, 2940.0]
[17.0, 17.0]
[48, 56]
p03328
u254128596
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\na_b = b - a\nnl = 0\n\nfor i in range(1, a_b):\n nl += i\n\nprint(a, nl)', 'a, b = map(int, input().split())\nnl = 0\nc = 0\nfor i in range(1, 999):\n nl += i\n if nl > a:\n break\nfor j in range(1, 1000):\n nl += j\n if nl > b:\n break\nprint(nl - b)', 'a, b = map(int, input().split())\na_b = b - a\nnl = 0\n\nfor i in range(1, a_b):\n nl += i\n\nprint(nl - a)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s185996932', 's317729369', 's442776830']
[3060.0, 2940.0, 2940.0]
[20.0, 17.0, 17.0]
[102, 190, 103]
p03328
u288948615
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\n\nprint( ((b-a) * (b-a) - b - a) / 2)\n', 'a, b = map(int, input())\n\nprint( ((b-a) * (b-a) - b - a) / 2)', 'a, b = map(int, input().split())\n\nprint( ((b-a) * (b-a) - b - a) // 2)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s060984925', 's226854623', 's246475992']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[70, 61, 71]
p03328
u302292660
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int,input().split())\nsm = 0\nfor i in range(b-a+1):\n sm+=i\nprint(b-sm)', 'a,b = map(int,input().split())\nsm = 0\nfor i in range(b-a+1):\n sm+=i\nprint(sm-b)']
['Wrong Answer', 'Accepted']
['s819000352', 's445748259']
[2940.0, 2940.0]
[17.0, 17.0]
[80, 80]
p03328
u312025627
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = (int(i) for i input().split())\nc = b - a\nd = c*(c+1)//2\nprint(d - b)', 'a, b = (int(i) for i in input().split())\nc = b - a\nd = c*(c+1)//2\nprint(d - b)\n']
['Runtime Error', 'Accepted']
['s582439255', 's567496648']
[2940.0, 2940.0]
[17.0, 17.0]
[75, 79]
p03328
u327794110
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['A,B = map(int,input().split())\nDif = B - A\nLarger = (1+Dif)*Dif/2\nDepthSnow = Larger - B\nprint(DepthSnow)', 'A,B = map(int,input().split())\nDif = B - A\nLarger = int((1+Dif)*Dif/2)\nDepthSnow = Larger - B\nprint(DepthSnow)']
['Wrong Answer', 'Accepted']
['s450970221', 's242773520']
[2940.0, 2940.0]
[17.0, 17.0]
[105, 110]
p03328
u329058683
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nc=b-a\nd=0\nfor i in range(c):\n d=i+d\nprint(d-b)', 'a,b=map(int,input().split())\nc=b-a\nd=0\nfor i in range(c+1):\n d=i+d\nprint(d-b)']
['Wrong Answer', 'Accepted']
['s650790570', 's154412167']
[2940.0, 2940.0]
[17.0, 17.0]
[76, 78]
p03328
u329706129
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\ns = [0] * 1002\nfor i in range(1002):\n s[i] = s[i - 1] + i\n if (s[i] == a): print(i)\n if (s[i - 1] - a == s[i] - b):\n print(s[i - 1] - a)\n break\nprint(s)', 'a, b = map(int, input().split())\ns = [0] * 1002\nfor i in range(1002):\n s[i] = s[i - 1] + i\n if (s[i - 1] - a == s[i] - b ):\n print(s[i - 1] - a)\n break\nprint(s)\n', 'a, b = map(int, input().split())\ns = [0] * 1002\nfor i in range(1002):\n s[i] = s[i - 1] + i\n if (s[i - 1] - a == s[i] - b):\n print(s[i - 1] - a)\n break\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s645606559', 's894493407', 's970824301']
[3060.0, 3060.0, 3060.0]
[18.0, 18.0, 18.0]
[194, 181, 171]
p03328
u330176731
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = list(map(int, input().split()))\ntower = 0\nfor x in range(b-a):\n tower += x+1\nprint(tower-a)', 'a,b = list(map(int, input().split()))\ntower = 0\nfor x in range(b-a):\n x+1\n tower += x\nprint(tower-a)']
['Wrong Answer', 'Accepted']
['s770599618', 's166303375']
[2940.0, 2940.0]
[17.0, 17.0]
[100, 106]
p03328
u331036636
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
[' ', 'a,b = map(int,input().split())\nsa = abs(a-b)\nsum = 0\nfor i in range(sa):\n sum += i\nprint(sum - a)']
['Wrong Answer', 'Accepted']
['s989786266', 's142008290']
[3068.0, 2940.0]
[18.0, 18.0]
[1, 100]
p03328
u339025042
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\n\nc = b - a\nN = (1+c)*c/2\nprint(b-N)', 'a, b = map(int, input().split())\n\nc = b - a\nN = (1+c)*c/2\nprint(N-b)\n', '\na, b = map(int, input().split())\n\nc = b - a\nN = (1+c)*c/2\nprint(int(N-b))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s265728720', 's334031177', 's429693088']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[68, 69, 75]
p03328
u339523379
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\n\ndepth=(b-a)*(b-a+1)/2-b\n\nprint(depth)', 'a,b=map(int,input().split())\n\ndepth=(b-a)*(b-a+1)/2-b\n\nprint(int(depth))']
['Wrong Answer', 'Accepted']
['s227356183', 's786228669']
[2940.0, 2940.0]
[17.0, 18.0]
[67, 72]
p03328
u342051078
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['import sys\na,b = map(int,input().split())\nc = b-a\nsum = 0\nfor i in range(1,1000):\n sum += i\n if i == c:\n print(sum - a)\n sys.exit(0)', "import sys\na,b = map(int,input().split())\nc = b-a\nsum = 0\nfor i in range(1,1000):\n #print(sum,'\\t')\n if i == c:\n #print('\\n')\n print(sum - a)\n sys.exit(0)\n sum += i"]
['Wrong Answer', 'Accepted']
['s724045619', 's296771067']
[2940.0, 2940.0]
[17.0, 17.0]
[152, 194]
p03328
u342456871
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\n\nans = (b-a)*(b-a-1)/2-a\n\nprint(ans)', 'a, b = map(int, input().split())\n\nprint(0.5*(b-a)*(b-a-1)-a)\n', 'a, b = map(int, input().split())\n\nans = (b-a)*(b-a-1)*0.5-a\n\nprint(ans)\n', 'a, b = map(int, input().split())\n\nprint(int(0.5*(b-a)*(b-a-1)-a))\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s756847161', 's802311985', 's838724640', 's522371641']
[3064.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 18.0]
[69, 61, 72, 66]
p03328
u347640436
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nt = b - a\nprint(b - ((t + 1) * t // 2))\n', 'a, b = map(int, input().split())\nt = b - a\nprint((t + 1) * t // 2 - b)\n']
['Wrong Answer', 'Accepted']
['s373089292', 's825447794']
[2940.0, 2940.0]
[17.0, 17.0]
[73, 71]
p03328
u350049649
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nprint(b-(b-a)(b-a+1)//2)', 'a,b=map(int,input().split())\nprint(b-(b-a)*(b-a+1)//2)\n', 'a,b=map(int,input().split())\nprint((b-a)*(b-a+1)//2-b)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s764108379', 's966711251', 's874793397']
[2940.0, 2940.0, 2940.0]
[19.0, 18.0, 18.0]
[53, 55, 54]
p03328
u350248178
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\n\ndef m(x):\n return x*(x+1)/2\n\nprint(m(b-a-1)-a)', 'a,b=map(int,input().split())\n\ndef m(x):\n return x*(x+1)/2\n\nprint(int(m(b-a-1)-a))']
['Wrong Answer', 'Accepted']
['s355933106', 's872540975']
[2940.0, 2940.0]
[17.0, 17.0]
[79, 84]
p03328
u368780724
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b =map(int,input().split())\ns = b - a\ns = s*(s+1)/2-b\ns = int(s)\ninput(s)', 'a,b =map(int,input().split())\ns = b - a\ns = s*(s+1)/2-b\ns = int(s)\ninput(s)', 'a,b =map(int,input().split())\ns = b-a\ns = int(s*(s+1)/2-b)\nprint(s)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s042770619', 's839967512', 's252398614']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[75, 75, 67]
p03328
u371467115
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nn=0\nfor i in range(1,a-b+1):\n n+=i\nprint(n-b)\n', 'a,b=map(int,input().split())\nn=0\nfor i in range(1,a-b+1):\n n+=i\nprint(n)', 'a,b=map(int,input().split())\nt=[i for i in range(b-a)]\nprint(sum(t)-a)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s178228446', 's591271820', 's503611362']
[2940.0, 2940.0, 3060.0]
[17.0, 18.0, 18.0]
[76, 73, 70]
p03328
u373295322
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\ndiff = b - a\nprint((diff * (diff+1) )/ 2 - b)', 'a, b = map(int, input().split())\ndiff = b - a\nprint((diff * (diff+1) ) // 2 - b)']
['Wrong Answer', 'Accepted']
['s918585918', 's535752458']
[2940.0, 2940.0]
[17.0, 18.0]
[78, 80]
p03328
u374103100
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\n\n\ndef get_height(n):\n return n * (n + 1) // 2\n\n\nh = get_height(b - a)\n\nprint(i - b)\n\n\n', 'a, b = map(int, input().split())\n\n\ndef get_height(n):\n return n * (n + 1) // 2\n\n\nh = get_height(b - a)\n\nprint(h - b)\n\n\n']
['Runtime Error', 'Accepted']
['s065420238', 's667587373']
[2940.0, 2940.0]
[18.0, 17.0]
[122, 122]
p03328
u375494588
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
["a,b = [int(i) for i in input().split(' ')]\nn=b-a\nN=n-1\nx=(1/2*N)*(N+1)\ny= x - a\nprint(y)\n", " a,b = [int(i) for i in input().split(' ')]\n n=b-a\n N=n-1\n ans=(1/2*N)*(N+1)\n bns= ans - a\n print(bns)", "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))"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s353013479', 's750547039', 's164511565']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[89, 102, 120]
p03328
u375616706
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\n\ndef sigma(n):\n return n*(n+1)//2\n\n\na, b = map(int, input().split())\nprint(sigma(b)-sigma(a))\n', '# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\n\ndef sigma(n):\n return n*(n+1)//2\n\n\na, b = map(int, input().split())\nprint(sigma(b-a))\n', '# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\n\ndef sigma(n):\n return n*(n+1)//2\n\n\na, b = map(int, input().split())\ndiff = b-a\nheight = sigma(b-a)\nprint(height-b)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s758423828', 's814598131', 's279944818']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0]
[196, 189, 218]
p03328
u378235715
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['c = 0\nA =input().split(" ")\na,b = A[0],A[1]\nfor i in range(1,a-b):\n c = c + i\nprint(a-c)\n', 'a,b = map(int, input().split())\nc = b-a\nd = 0\n\nfor i in range(1,c):\n d = i + d\n\nprint(d - a)\n\n\n']
['Runtime Error', 'Accepted']
['s413686517', 's027881368']
[2940.0, 2940.0]
[17.0, 17.0]
[92, 98]
p03328
u381713448
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int,input().split())\nn = b - a\nc = (1+a)*n//2\nprint(c-a)', 'a,b = map(int,input().split())\nn = b - a\nc = (1+n)*n//2\nprint(c-b)']
['Wrong Answer', 'Accepted']
['s070130334', 's517552336']
[2940.0, 2940.0]
[17.0, 17.0]
[66, 66]
p03328
u382639013
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['A, B = map(int, input().split())\n\nprint((B - A )*( B - A +1)/2 - B )', 'A, B = map(int, input().split())\n\nprint(int((B - A )*( B - A +1)/2 - B ))']
['Wrong Answer', 'Accepted']
['s214728436', 's678331388']
[9120.0, 9116.0]
[28.0, 30.0]
[68, 73]
p03328
u384679440
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nx = 2 * b - a\nprint(x)', 'a, b = map(int, input().split())\nx = b * (b - 1) / 2 - a\nprint(x)', 'a, b = map(int, input().split())\nx = int((b - a) * (b - a + 1) / 2 - b)\nprint(x)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s451901266', 's717604348', 's700092757']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[55, 65, 80]
p03328
u386806606
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=input().split(" ")\na=int(a)\nb=int(b)\nprint((b-a)*(b-a+1)/2-b)', 'a,b=input().split(" ")\na=int(a)\nb=int(b)\nprint(int((b-a)*(b-a+1)/2-b))']
['Wrong Answer', 'Accepted']
['s578028865', 's905185483']
[2940.0, 2940.0]
[17.0, 17.0]
[65, 70]
p03328
u394731058
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int, input().split())\nd = b - a\nbh = 0\nfor i in range(n+1):\n bh += bh + i\nprint(bh - b)', 'a,b = map(int, input().split())\nbh = 0\nfor i in range(b-a+1):\n bh += i\nprint(bh-b)']
['Runtime Error', 'Accepted']
['s271082142', 's532435607']
[3064.0, 2940.0]
[18.0, 18.0]
[98, 83]
p03328
u409064224
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = list(map(int,input().split()))\n\nn = b-a\nnum = 0\n\nfor i in range(n):\n num += i\nelse:\n print(num -b) \n', 'a,b = list(map(int,input().split()))\n\nn = b-a\nnum = 0\n\nfor i in range(n+1):\n num += i\nelse:\n print(num -b) \n']
['Wrong Answer', 'Accepted']
['s798138401', 's212926975']
[2940.0, 2940.0]
[17.0, 19.0]
[112, 114]
p03328
u416758623
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int, input().split())\ntotal = 0\nans = 0\nfor i in range(1,1000):\n total += i\n if total - b => 0:\n ans = total -b\n break\n \nprint(ans)', 'a,b = map(int, input().split())\ns = b -a\nans = 0\nfor i in range(1,s):\n ans += i\n \nprint(ans - a)']
['Runtime Error', 'Accepted']
['s379641927', 's564174584']
[2940.0, 2940.0]
[17.0, 17.0]
[168, 98]
p03328
u422104747
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['s=input().split()^M\nprint(-int(s[0])+(int(s[1])-int(s[0])-1)*(int(s[1])-int(s[0]))//2)', 's=input().split()\nprint(int[1]-(int(s[1])-int(s[0])-1)*(int(s[1])-int(s[0]))/2)', 's=input().split()\nprint(-int(s[0])+(int(s[1])-int(s[0])-1)*(int(s[1])-int(s[0]))//2)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s013391169', 's430866199', 's363931981']
[2940.0, 2940.0, 3064.0]
[17.0, 17.0, 17.0]
[86, 79, 84]
p03328
u447362004
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['# coding: utf-8\n\na, b = [int(x) for x in input().split()]\n\nprint(a, b)\n\ndiff = b - a\nb_height = diff * (diff + 1) / 2\nsnow_height = int(b_height - b)\n\nprint(snow_height)\n', '# coding: utf-8\n\na, b = [int(x) for x in input().split()]\n\ndiff = b - a\nb_height = diff * (diff + 1) / 2\nsnow_height = int(b_height - b)\n\nprint(snow_height)\n']
['Wrong Answer', 'Accepted']
['s205957119', 's722094385']
[2940.0, 2940.0]
[17.0, 17.0]
[170, 157]
p03328
u452015170
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\nbtruelength = (b -a) * (b - a + 1) // 2\nprint(b- btruelength)', 'a, b = map(int, input().split())\nbtruelength = (b -a) * (b - a + 1) // 2\nprint(btruelength - b)']
['Wrong Answer', 'Accepted']
['s970304087', 's035757017']
[2940.0, 2940.0]
[19.0, 17.0]
[94, 95]
p03328
u455696302
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=[int(i) for i in input().split()]\n\nd = b - a\n\nfor i in range(1,d):\n h += i\n\nprint(h-a)\n', 'a,b=[int(i) for i in input().split()]\n\nh = 0\ni = 0\nwhile h <= b and i < 1000:\n i += 1\n h += i\n\nprint(b-h)', 'a,b=[int(i) for i in input().split()]\n\nh = 0\ni = 0\nwhile h < a and i < 1000:\n i += 1\n h += i\n\nif i > 999\n print(h-b)\nelse:\n print(h-a)', 'a,b=[int(i) for i in input().split()]\n\nh = 0\ni = 0\nwhile h < a and i < 1000:\n i += 1\n h += i\n\nprint(h-b)', 'a,b=[int(i) for i in input().split()]\n\nd = b - a\n\nh = 0\nfor i in range(1,d):\n h += i\n\nprint(h-a)']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s253534772', 's323032630', 's457849164', 's866655101', 's023158107']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[94, 111, 146, 110, 99]
p03328
u455957070
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int,input().split())\nc = abs(b - a)\nx = 0\nfor i in range(1,c+1):\n x += 1\nprint(x-b)\n', 'a,b = map(int,input().split())\nc = abs(b - a)\nx = 0\nfor i in range(1,c+1):\n x += i\nprint(x-b)']
['Wrong Answer', 'Accepted']
['s731979612', 's620434606']
[9076.0, 9176.0]
[26.0, 24.0]
[95, 94]
p03328
u467881696
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
["if __name__ == '__main__':\n a,b = input()\n X = b - a \n s = int((X*(X+1))/2 - b)\n print(s)", '\na,b = input()\nX = b - a \ns = int((X*(X+1))/2 - b)\nprint(s)', 'a = int(input())\nb = int(input())\nX = b - a \ns = int((X*(X+1))/2 - b)\nprint(s)', 'data = list(map(int,input().split()))\na = data[0]\nb = data[1]\ns = int(((b-a)*((b-a)+1))/2 - b)\nprint(s)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s571400114', 's683765830', 's813708384', 's797262538']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[101, 59, 78, 103]
p03328
u469953228
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\n\nn=b-a\n\nprint(n(n+1)//2-b)', 'a,b=map(int,input().split())\n\nn=b-a\n\nprint(n*(n+1)//2-b)']
['Runtime Error', 'Accepted']
['s876726203', 's664186329']
[2940.0, 2940.0]
[17.0, 17.0]
[55, 56]
p03328
u476435125
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['lst=list(map(int,input().split()))\na=lst[0]\nb=lst[1]\nprint((b-a)*(b-a+1)/2-b)', 'lst=list(map(int,input().split()))\na=lst[0]\nb=lst[1]\nk=(b-a)*(b-a+1)/2-b\nprint(int(k))\n']
['Wrong Answer', 'Accepted']
['s149407301', 's101666458']
[3064.0, 2940.0]
[17.0, 17.0]
[77, 87]
p03328
u491656579
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['A, B = input().split()\na = int(A)\nb = int(B)\nsa = b - a\nans = 0\n\nfor i in range(1, sa - 1):\n ans += i\n\nprint(ans)\n', 'A, B = input().split()\na = int(A)\nans = 0\n\nfor i in range(a):\n ans += i\n\nprint(ans)\n', 'A, B = input().split()\na = int(A)\nans = 0\n\nfor i in range(a - 1):\n ans += i\n\nprint(ans)\n', 'A, B = input().split()\na = int(A)\nans = 0\n\nfor i in range(1, a):\n ans += i\n\nprint(ans)\n', 'A, B = input().split()\na = int(A)\nans = 0\n\nfor i in range(a -1 ):\n ans += i\n\nprint(ans)\n', 'a,b = map(int, input().split())\n\ny = b - a - 1\nw_hight = 0\n\nfor i in range(1, y):\n w_hight += i\n\nprint(w_hight - a)', 'a,b = map(input().split())\n\ny = b - a - 1\nw_hight = 0\n\nfor i in range(1, y):\n w_hight += i\n\nprint(w_hight - a)', 'a,b = map(int, input().split())\n\ny = b - a - 1\nw_hight = 0\n\nfor i in range(1, y + 1):\n w_hight += i\n\nprint(w_hight - a)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s006784250', 's077337756', 's232815152', 's371065334', 's572019656', 's679695178', 's808680366', 's662232634']
[3064.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 69.0, 72.0, 69.0, 78.0, 17.0, 17.0, 17.0]
[117, 87, 91, 90, 91, 118, 113, 122]
p03328
u513081876
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\n\nfor n in range(1, 999):\n for x in range(1, 499500):\n if a == (1/2)*n*(n+1)-x and b == (1/2)*(n+1)*(n+2)-x:\n print(x)\n break', 'a, b = map(int, input().split())\nc = list(range(1, b-a))\nprint(sum(c)-a)\n']
['Time Limit Exceeded', 'Accepted']
['s273772546', 's807282678']
[2940.0, 3060.0]
[2104.0, 17.0]
[189, 73]
p03328
u518064858
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b=map(int,input().split())\nc=(b-c)\ns=0\nfor i in range(1,c+1):\n s+=i\nprint(s-b)', 'a,b=map(int,input().split())\nc=(b-a)\ns=0\nfor i in range(1,c+1):\n s+=i\nprint(s-b)\n']
['Runtime Error', 'Accepted']
['s667823598', 's178212105']
[2940.0, 2940.0]
[18.0, 18.0]
[83, 84]
p03328
u529722835
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = (int(n) for n in input().split())\nN = b - a\nH = -a\nfor h in range(N):\n H += h + 1 \nprint(H)', 'a, b = (int(n) for n in input().split())\nN = b - a\nH = -a\nfor h in range(N):\n H += h + 1 \nprint(h)', 'a, b = (int(n) for n in input().split())\nN = b - a\nH = -a\nfor h in range(N):\n H += h \nprint(H)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s081631242', 's085090449', 's263009490']
[2940.0, 3064.0, 2940.0]
[18.0, 17.0, 17.0]
[101, 99, 97]
p03328
u534953209
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a ,b = map(int, input(). split())\nx = (b - a)*(b - a - 1)/2 - a\nprint(x)', 'a ,b = map(int, input(). split())\nx = (b - a)*(b - a - 1)/2 - a\nprint(int(x))\n']
['Wrong Answer', 'Accepted']
['s676673116', 's172198705']
[2940.0, 2940.0]
[17.0, 18.0]
[72, 78]
p03328
u540290227
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a, b = map(int, input().split())\ni = 1\nc = 2\nwhile i <= a:\n i += c\n c += 1\nprint(b-i)', 'a, b = map(int, input().split())\nprint((b-a) * (b-a+1) // 2 - b)']
['Wrong Answer', 'Accepted']
['s415510903', 's119707348']
[8980.0, 9012.0]
[26.0, 28.0]
[91, 64]
p03328
u546842199
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are a meters for the west tower, and b meters for the east tower. Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover. Assume also that the depth of the snow cover is always at least 1 meter.
['a,b = map(int,input().split())\nn = (b-a)\nsum = 0\nfor i in range(1,n):\n sum +=i\n if n**2= a+b+(sum-a)*2: \n print(sum-a)\n else: \n continue', 'a,b = map(int,input().split())\nn = (b-a)\nsum = 0\nfor i in range(1,n):\n sum +=i\n if n**2==a+b+(sum-a)*2: \n print(sum-a)\n else: \n continue\n \n\n\n']
['Runtime Error', 'Accepted']
['s579524182', 's742529645']
[2940.0, 2940.0]
[17.0, 18.0]
[162, 170]