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 = input().split()
a = int(A)
b = int(B)
sa = b - a
ans = 0

for i in range(1, sa - 1):
    ans += i

print(ans)


A, B = input().split()
a = int(A)
ans = 0

for i in range(a):
    ans += i

print(ans)


A, B = input().split()
a = int(A)
ans = 0

for i in range(a - 1):
    ans += i

print(ans)


A, B = input().split()
a = int(A)
ans = 0

for i in range(1, a):
    ans += i

print(ans)


A, B = input().split()
a = int(A)
ans = 0

for i in range(a -1 ):
    ans += i

print(ans)


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

y = b - a - 1
w_hight = 0

for i in range(1, y):
    w_hight += i

print(w_hight - a)

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

y = b - a - 1
w_hight = 0

for i in range(1, y):
    w_hight += i

print(w_hight - a)

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

y = b - a - 1
w_hight = 0

for i in range(1, y + 1):
    w_hight += i

print(w_hight - a)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

for n in range(1, 999):
    for x in range(1, 499500):
        if a == (1/2)*n*(n+1)-x and b == (1/2)*(n+1)*(n+2)-x:
            print(x)
            break

a, b = map(int, input().split())
c = list(range(1, b-a))
print(sum(c)-a)


Verdicts: Time Limit Exceeded

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-c)
s=0
for i in range(1,c+1):
    s+=i
print(s-b)

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

a, b = (int(n) for n in input().split())
N = b - a
H = -a
for h in range(N):
  H += h + 1 
print(h)

a, b = (int(n) for n in input().split())
N = b - a
H = -a
for h in range(N):
    H += h 
print(H)

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())
x = (b - a)*(b - a - 1)/2 - a
print(x)

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

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().split())
n = (b-a)
sum = 0
for i in range(1,n):
    sum +=i
    if n**2= a+b+(sum-a)*2:    
        print(sum-a)
    else: 
        continue

a,b = map(int,input().split())
n = (b-a)
sum = 0
for i in range(1,n):
    sum +=i
    if n**2==a+b+(sum-a)*2:    
        print(sum-a)
    else: 
        continue
    




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())
k = b-a
al = (1+k)*k / 2
print(al-b)

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


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

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

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 - sum(range(b - a + 1)))


a,b = map(int, input().split())
print(sum(range(b - a + 1)) - 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):
N = int(input())
now = 0
ans = 0
for i in range(1,N+1):
    if i%2 == 0:
        continue
    else:
        for j in range(1,i+1):
            if i%j == 0:
                now += 1
        if now == 8:
            ans += 1
        now = 0
print(ans)

a,b = map(int,input().split())
x = 1
y = 3
for i in range(10**5):
    if x-a == y-b:
        print(x-a)
        break
    else:
        x += i+2
        y += i+3

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
sumn=n*(1+n)//2
print(sumn)

print(sumn-b)


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

print(sumn-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):
10 11a = [int(i) for i in input().split()]
b=a[0]
c=a[1]
x=c-b
print(round((x+1)*x/2)-c)

a = [int(i) for i in input().split()]
b=a[0]
c=a[1]
x=c-b
print(round((x+1)*x/2)-c)

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(x) for x in input().split()]
n = b - a
wa = sum(range(n))
print(wa - b)

a, b = [int(x) for x in input().split()]
n = b - a
wa = sum(range(n+1))
print(wa - 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())
dp = []
dp[0] = 1
dp[1] = 2
for i in range(1000):
  dp[i] = dp[0] + dp[1+i]
  print(dp[i])

a, b = map(int, input().split())
print(round((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())
c=b-a
x=c*(c+1)/2 - b
print(str(x))

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


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

for s in range(c):
    sum += s+1

print(sum-b)

a,b=(int(i) for i in input().split())
c = b - a
zako = 0
for d in range(c):
    zako += d + 1
print(zako-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())
ls = [1]
for i in range(999):
    ls.append(ls[i]+i+2)
for i in range(len(ls)):
    if ls[i] > a:
        print(abs(ls[i+1]-a))
        break

a,b = map(int,input().split())
ls = [1]
for i in range(999):
    ls.append(ls[i]+i+2)
for i in range(len(ls)):
    if ls[i] > a:
        print(abs(ls[i+1]-a))
        break

a,b = map(int,input().split())
ls = [1]
for i in range(998):
    ls.append(ls[i]+i+2)
    
t = b-a

for i in range(len(ls)-1):
    if (ls[i+1] - ls[i]) == t:
        print(ls[i]-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):
# coding:utf-8
a, b= map(int, input().split())

diff = b-a
d = 0
for i in enumerate(diff+1, 1):
    d += i 

print(abs(d-a)
    


# coding:utf-8
a, b= map(int, input().split())

diff = b-a
d = 0
for i in range(1, diff):
    d += int(i)

print (d)
print(abs(d-a))

# coding:utf-8
a, b= map(int, input().split())

diff = b-a
d = 0
for i in range(1, diff):
    d += int(i)
print(abs(d-a))

Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
import sys

def main():
  input = sys.stdin.readline
  a, b = map(int, input().split())
  diff = b - a
  ah = sum([a for a in range(1, diff+1)])
  print(ah-a)


if __name__ == '__main__':
  main()

import sys

def main():
  input = sys.stdin.readline
  a, b = map(int, input().split())
  diff = b - a
  ah = sum([i for i in range(1, diff)])
  print(ah-a)


if __name__ == '__main__':
  main()

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

N=int(input())

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

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

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())
sum = 0
for i in range(1,1000):
  if a > sum:
    sum += i
  else:
    print(sum - a)

import sys
a,b = map(int,input().split())
sum = 0
for i in range(1,1000):
while(a > sum):
	i = 1
    sum += 1
    i += 1
print(sum-a)



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

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 = list(map(int, input()))
answer = (b - a) * (b - a + 1) / 2 - b
print(int(answer))


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


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())
tower = []
tmp = 0

for i in range(1, 1000):
    tmp += 1
    tower.append(tmp)
    
count = a - b

print(tower[count - 1] - b)

a, b ＝ map(int, input().split())
tower = []
tmp = 0

for i in range(1, 1000):
    tmp += 1
    tower.append(tmp)
    
count = b - a

print(tower[count - 1] - b)


a, b ＝ map(int, input().split())
tower = []
tmp = 0

for i in range(1, 1000):
    tmp += i
    tower.append(tmp)
    
count = b - a

print(tower[count - 1] - b)


a, b = map(int, input().split())
tower = []
tmp = 0

for i in range(1, 1000):
    tmp += i
    tower.append(tmp)
    
count = b - a

print(tower[count - 1] - b)


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())
for i in range (1,1000):
  n = i(i+1)//2
  if b - a == i:
    print(n-a)
  

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


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


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


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

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

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

a,b=map(int,input().split());a-=b;print(~-a*a//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):
package main

import (
    "fmt"
    "math/rand"
    "time"
)

func swap(data []float64, i,

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

num = b - a
h = 0
for i in range(num):
    h += i

print(h-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())
print(b*(b+1)/2-b)

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

a,b=map(int, input().split())
print(sum([1:b])-(b-a))

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

Verdicts: Wrong Answer

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):
def delta2lower_height(arg_num):
    height = 0
    for i in range(1, arg_num):
        height += i
    return height

input_line = input().split()

higher_margin = int(input_line[0])
lower_margin = int(input_line[1])

delta = higher_margin - lower_margin

lower_height = delta2lower_height(delta)
snow_height = lower_height - lower_margin

print(str(snow_height))

def delta2lower_height(arg_num):
    height = 0
    for i in range(1, arg_num):
        height += i
    return height


lower_margin, higher_margin = map(int, input().split())

delta = higher_margin - lower_margin

lower_height = delta2lower_height(delta)
snow_height = lower_height - lower_margin

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())
h = 0
for i in range(1, 1000):
    h += i
    ans = (2*h + i+1 - a - b)/2
    if ans > 0:
        print(ans)
        exit()

a, b = map(int, input().split())
n = b-a-1
h = 0
for i in range(1, n+1):
    h += i
#print(h)
print(h-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())
tower = [n*(2+(i-1))/2 for i in range(1, 1000)]

for i in range(999):
  if b - a == tower[i+1] - tower[i]:
    print(a-tower[i])
    break


a, b = map(int, input().split())
tower = [i*(2+(i-1))/2 for i in range(1, 1000)]

for i in range(999):
    if a - tower[i] == b - tower[i+1]:
        print(int(abs(tower[i]-a)))
        break

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

max_n = 0

for i in range(1,n):
    x = set()
    y = set()
    for j in range(0,i):
        x.add(s[j])
    for j in range(i,n):
        y.add(s[j])

    if len(x|y) > max_n:
        max_n = len(x|y)

print(max_n)



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

k = b - a - 1

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

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

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

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 = [0]
for i in range(1, 1000):
    c.append(c[i-1]+i)
    print(c[i-1], end=' ')
    if c[i-1]-a > 0:
        ans = c[i-1]-a
        if a+ans == c[i-1] and b+ans == c[i]:
            break
        else:
            ans = 0
print(ans)


a, b = map(int, input().split())
c = [0]
for i in range(1, 1000):
    c.append(c[i-1]+i)
    if c[i-1]-a > 0:
        ans = c[i-1]-a
        if a+ans == c[i-1] and b+ans == c[i]:
            break
        else:
            ans = 0
print(ans)


Verdicts: Wrong Answer

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

Submission attempts (in order):
tall=[int(i) for i in input().split()]
dist=tall[1]-tall[0]

left=0
for i in range(dist):
  left+=i
print(left-tall[0],end=" ")
print(left+dist-tall[1])

tall=[int(i) for i in input().split()]
dist=tall[1]-tall[0]

left=0
for i in range(dist):
  left+=i
print(left-tall[0])

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
wa = c*(c+1)//2
print(b-wa)

a,b = map(int,input().split())
c = b-a
wa = c*(c+1)//2
print(wa-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())
c = b-a
n = c*(c+1)/2
ans = n-b
print(ans)

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

Verdicts: Wrong Answer

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

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

h = c(c+1)//2
print(h-b)

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

h = c*(c+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):
if int(input()) < 1000:
    print('ABC')
else:
    print('ABD')


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


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())
ans = 0
for i in range(b-a):
    ans += i
print(ans)

a, b = map(int, input().split())
ans = 0
for i in range(b-a):
    ans += i
print(ans - 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):
#Stone Monument
a,b = map(int, input().split())
M = []
ans = []
for i in range(1,1000,1):
	n = 1/2*i*(i+1)
	M.append(n)
for i in range(0,999,1):
	for j in range(0,1/2*i*(i+1),1):
		if (a + j == M[i]) and (b + j == M[i+1]):
			ans.append(j)

print(min(ans))

#Stone Monument
a,b = map(int, input().split())
M = []
for i in range(1,1000,1):
	n = 1/2*i*(i+1)
	M.append(n)
n = b-a-1
print(int(M[n-1]-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 = int(input())
z =[]

c = 0
for i in 999:
  c +=i
  z.append(c)

w =max(a,b)-min(a,b)
if (w==z[i+1]-z[i]):
  print(z[i]-a)

a,b = map(int,input().split)
z =[]

c = 0
for i in 999:
  c +=i
  z.append(c)

w =max(a,b)-min(a,b)
if (w==z[i+1]-z[i]):
  print(z[i]-a)


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


Verdicts: Runtime Error

Runtime Error

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

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

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

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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b=map(int,input().split())
N=b-a
print(sum(list(range(1,N))))

a,b=map(int,input().split())
N=b-a
print(sum(list(range(1,N+1))))

a,b=map(int,input().split())
N=b-a
print(sum(list(range(1,N+1)))-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())
print(sum(range(b-a)-a))

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

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

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())
print(((a-b)*(a-b)-(a+b))/2)

import math

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

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 = a-b
m = int(s*(s+1)/2)
print(m-b)

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

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 itertools

n, m = map(int, input().split())
l = itertools.accumulate([1] * 999)
print(l[m-n-1] - m)

import itertools

n, m = map(int, input().split())
l = list(itertools.accumulate(range(1, 1000)))
print(l[m-n-1]-m)

Verdicts: Runtime Error

Accepted