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

Submission attempts (in order):
a, b = map(int, input().split())
A = list(range(1, 1000))
print(A)
for i in range(1 ,999):
    A[i] += A[i-1]
import numpy as np 
A = np.array(A)
res = 1
while True:
    A = A - 1
    if a in A and b in A:
        break
    else:
        res += 1
print(res)


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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
x = [i  *(i + 1) // 2 for i in range(1, 1000)]
for i in x:
    if a <  i < b and i - a == b - i:
        print(i - a)
        break


a, b = map(int, input().split())
x = [i  *(i + 1) // 2 for i in range(1, 1000)]
for i in range(999):
    if a <  x[i] and x[i] - a == x[i+1] - b:
        print(x[i] - a)
        break


Verdicts: Wrong Answer

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

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

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

print((n*(n+1))/2 - b)

#coding:utf-8

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

print((n*(n+1))//2 - b)

Verdicts: Wrong Answer

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

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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b = (int(i) for i in input().split())

length = b - a
count = length - 1

for j in range(length):
  a -= count
  print(a)
  if a =< 0:
    print(1 - a)
    break
  else:
    count -= 1
    print(count)

a,b = (int(i) for i in input().split())

length = b - a
count = length - 1

for j in range(length):
  a -= count
  print(a)
  if a <= 0:
    break
  else:
    count -= 1
    

a,b = (int(i) for i in input().split())

length = b - a
result = 0

for j in range(length):
  result += j
  
print(result + length - b)


Verdicts: Runtime Error

Wrong Answer

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

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

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



Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
if b != 100:
    print(b * (100 ** a))
else:
    print((b+1) * (100 ** a))

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

high = (b-a+1)*(b-a)//2
print(high-b)

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split(" "))

delta = b - a

high_east = (1 + delta) * delta // 2
snow = high_east - b

print(b)

a, b = map(int, input().split(" "))

delta = b - a

high_east = (1 + delta) * delta // 2
snow = high_east - b

print(snow)

Verdicts: Wrong Answer

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

Submission attempts (in order):
l = int(input().split())

a = int(l[0])
b = int(l[1])

n = b - a

h = n * (n + 1) // 2

print(h-b)

l = input().split()

a = int(l[0])
b = int(l[1])

n = b - a

h = n * (n + 1) // 2

print(h-b)

Verdicts: Runtime Error

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

Submission attempts (in order):
a,b = [int(i) for i in input().split()]
     
souwa = 0
n = b - a
for i in range(n):
    souwa += i
         
x = souwa - b
         
print(x)

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

souwa = 0
n = b - a
for i in range(n):
    souwa += i

x = souwa - b

print(x)

    a,b = [int(i) for i in input().split()]
     
    souwa = 0
    n = b - a
    for i in range(n):
        souwa += i
         
    x = souwa - b
         
    print(x)

a,b = [int(i) for i in input().split()]
     
souwa = 0
n = b - a
for i in range(n+1):
    souwa += i
         
x = souwa - b
         
print(x)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a, b = map(int, input().split())
a_b = b - a
nl = 0

for i in range(1, a_b):
    nl += i

print(a, nl)

a, b = map(int, input().split())
nl = 0
c = 0
for i in range(1, 999):
    nl += i
    if nl > a:
        break
for j in range(1, 1000):
    nl += j
    if nl > b:
        break
print(nl - b)

a, b = map(int, input().split())
a_b = b - a
nl = 0

for i in range(1, a_b):
    nl += i

print(nl - a)

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())

print( ((b-a) * (b-a) - b - a) / 2)


a, b = map(int, input())

print( ((b-a) * (b-a) - b - a) / 2)

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

print( ((b-a) * (b-a) - b - a) // 2)


Verdicts: Wrong Answer

Runtime Error

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

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

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

Verdicts: Wrong Answer

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

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

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


Verdicts: Runtime Error

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

Submission attempts (in order):
A,B = map(int,input().split())
Dif = B - A
Larger = (1+Dif)*Dif/2
DepthSnow = Larger - B
print(DepthSnow)

A,B = map(int,input().split())
Dif = B - A
Larger = int((1+Dif)*Dif/2)
DepthSnow = Larger - B
print(DepthSnow)

Verdicts: Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

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

a, b = map(int, input().split())
s = [0] * 1002
for i in range(1002):
    s[i] = s[i - 1] + i
    if (s[i - 1] - a == s[i] - b ):
        print(s[i - 1] - a)
        break
print(s)


a, b = map(int, input().split())
s = [0] * 1002
for i in range(1002):
    s[i] = s[i - 1] + i
    if (s[i - 1] - a == s[i] - b):
        print(s[i - 1] - a)
        break


Verdicts: Wrong Answer

Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
 

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())

c = b - a
N = (1+c)*c/2
print(b-N)

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

c = b - a
N = (1+c)*c/2
print(N-b)



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

c = b - a
N = (1+c)*c/2
print(int(N-b))


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a,b=map(int,input().split())

depth=(b-a)*(b-a+1)/2-b

print(depth)

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

depth=(b-a)*(b-a+1)/2-b

print(int(depth))

Verdicts: Wrong Answer

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

Submission attempts (in order):
import sys
a,b = map(int,input().split())
c = b-a
sum = 0
for i in range(1,1000):
    sum += i
    if i == c:
        print(sum - a)
        sys.exit(0)

import sys
a,b = map(int,input().split())
c = b-a
sum = 0
for i in range(1,1000):
    #print(sum,'\t')
    if i == c:
        #print('\n')
        print(sum - a)
        sys.exit(0)
    sum += i

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())

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

print(ans)

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

print(0.5*(b-a)*(b-a-1)-a)


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

ans = (b-a)*(b-a-1)*0.5-a

print(ans)


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

print(int(0.5*(b-a)*(b-a-1)-a))


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

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


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


Verdicts: Wrong Answer

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

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

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


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

Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
a,b=map(int,input().split())

def m(x):
    return x*(x+1)/2

print(m(b-a-1)-a)

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

def m(x):
    return x*(x+1)/2

print(int(m(b-a-1)-a))

Verdicts: Wrong Answer

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

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

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

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

Verdicts: Runtime Error

Runtime Error

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

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


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

a,b=map(int,input().split())
t=[i for i in range(b-a)]
print(sum(t)-a)

Verdicts: Wrong Answer

Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())


def get_height(n):
    return n * (n + 1) // 2


h = get_height(b - a)

print(i - b)




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


def get_height(n):
    return n * (n + 1) // 2


h = get_height(b - a)

print(h - b)




Verdicts: Runtime Error

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

Submission attempts (in order):
a,b = [int(i) for i in input().split(' ')]
n=b-a
N=n-1
x=(1/2*N)*(N+1)
y= x - a
print(y)


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

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

Verdicts: Wrong Answer

Runtime Error

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

Submission attempts (in order):
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def sigma(n):
    return n*(n+1)//2


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


# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def sigma(n):
    return n*(n+1)//2


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


# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def sigma(n):
    return n*(n+1)//2


a, b = map(int, input().split())
diff = b-a
height = sigma(b-a)
print(height-b)


Verdicts: Wrong Answer

Wrong Answer

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

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


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

for i in range(1,c):
    d = i + d

print(d - a)




Verdicts: Runtime Error

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int, input().split())

print((B - A )*( B - A +1)/2 - B )

A, B = map(int, input().split())

print(int((B - A )*( B - A +1)/2 - B ))

Verdicts: Wrong Answer

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a,b = list(map(int,input().split()))

n = b-a
num = 0

for i in range(n):
    num += i
else:
    print(num -b) 


a,b = list(map(int,input().split()))

n = b-a
num = 0

for i in range(n+1):
    num += i
else:
    print(num -b) 


Verdicts: Wrong Answer

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

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
s=input().split()^M
print(-int(s[0])+(int(s[1])-int(s[0])-1)*(int(s[1])-int(s[0]))//2)

s=input().split()
print(int[1]-(int(s[1])-int(s[0])-1)*(int(s[1])-int(s[0]))/2)

s=input().split()
print(-int(s[0])+(int(s[1])-int(s[0])-1)*(int(s[1])-int(s[0]))//2)

Verdicts: Runtime Error

Runtime Error

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

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

a, b = [int(x) for x in input().split()]

print(a, b)

diff = b - a
b_height = diff * (diff + 1) / 2
snow_height = int(b_height - b)

print(snow_height)


# coding: utf-8

a, b = [int(x) for x in input().split()]

diff = b - a
b_height = diff * (diff + 1) / 2
snow_height = int(b_height - b)

print(snow_height)


Verdicts: Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b=[int(i) for i in input().split()]

d = b - a

for i in range(1,d):
    h += i

print(h-a)


a,b=[int(i) for i in input().split()]

h = 0
i = 0
while h <= b and i < 1000:
    i += 1
    h += i

print(b-h)

a,b=[int(i) for i in input().split()]

h = 0
i = 0
while h < a and i < 1000:
    i += 1
    h += i

if i > 999
    print(h-b)
else:
    print(h-a)

a,b=[int(i) for i in input().split()]

h = 0
i = 0
while h < a and i < 1000:
    i += 1
    h += i

print(h-b)

a,b=[int(i) for i in input().split()]

d = b - a

h = 0
for i in range(1,d):
    h += i

print(h-a)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

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

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


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

Verdicts: Wrong Answer

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

Submission attempts (in order):
if __name__ == '__main__':
    a,b = input()
    X = b - a 
    s = int((X*(X+1))/2 - b)
    print(s)


a,b = input()
X = b - a 
s = int((X*(X+1))/2 - b)
print(s)

a = int(input())
b = int(input())
X = b - a 
s = int((X*(X+1))/2 - b)
print(s)

data = list(map(int,input().split()))
a = data[0]
b = data[1]
s = int(((b-a)*((b-a)+1))/2 - b)
print(s)

Verdicts: Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
a,b=map(int,input().split())

n=b-a

print(n(n+1)//2-b)

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

n=b-a

print(n*(n+1)//2-b)

Verdicts: Runtime Error

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

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

lst=list(map(int,input().split()))
a=lst[0]
b=lst[1]
k=(b-a)*(b-a+1)/2-b
print(int(k))


Verdicts: Wrong Answer

Accepted