qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
k = 0
for i in range(1, len(A)-N, 2):
  k += A[i]
  print(k)


Fixed code:
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
k = 0
for i in range(1, len(A)-N, 2):
  k += A[i]
print(k)
Buggy code:
n = int(input())
a = list(map(int, input().split()))
a.sort()
s = 0
for i in range(n):
    s += a[i * 2 + n]
print(sum(s))

Fixed code:
n = int(input())
a = list(map(int, input().split()))
a.sort()
s = 0
for i in range(n):
    s += a[i * 2 + n]
print(s)
Buggy code:
import sys
 
N = int(sys.stdin.readline())
a = sorted(list(map(int, sys.stdin.readline().split(" "))), reverse=True)
sum = 0
for i in range(N):
  sum += a[2 * N + 1]
print(sum)

Fixed code:
import sys
 
N = int(sys.stdin.readline())
a = sorted(list(map(int, sys.stdin.readline().split(" "))), reverse=True)
sum = 0
for i in range(N):
  sum += a[2 * i + 1]
print(sum)
Buggy code:
N = int(input())
a = sorted(list(map(int, input().split())), reverse=True)

print(sum(a[1:2*n:2]))

Fixed code:
n = int(input())
a = list(map(int, input().split()))

print(sum(sorted(a, reverse=True)[1 : n * 2 : 2]))
Buggy code:
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
print(sum(A[1::2][N]))

Fixed code:
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
print(sum(A[1::2][:N]))
Buggy code:
N = int(input())
a = list(map(int,input().split()))

a.sort(reverse=True)
s = 0

for i in [n*2 for n in range(1,N +1)]:
    s += a[i]

print(s)


Fixed code:
N = int(input())
a = list(map(int,input().split()))

a.sort(reverse=True)
s = 0

for i in [n*2-1 for n in range(1,N +1)]:
    s += a[i]

print(s)
Buggy code:
N = int(input())

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

a = sorted(a, reverse=True)



SUM = 0

for i in range(1, N*2, 2):
    
    SUM = SUM + a[i]
    print(SUM)
    

Fixed code:
N = int(input())

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

a = sorted(a, reverse=True)



SUM = 0

for i in range(1, N*2, 2):
    
    SUM = SUM + a[i]

print(SUM)
Buggy code:
N = int(input())
total_members = N*3
members = sorted(map(int, input().split()))
total = 0
for i in range(0, N):
    total += members[i * 2 + 1]
print (total)

Fixed code:
N = int(input())
total_members = N*3
members = sorted(map(int, input().split()), reverse=True)
total = 0
for i in range(0, N):
    total += members[i * 2 + 1]
print (total)
Buggy code:
n = int(input())
a = sorted(list(map(int, input().split())))
ans = 0
for i in range(n, n*3, 2):
    print(i)
    ans += a[i]
print(ans)

Fixed code:
n = int(input())
a = sorted(list(map(int, input().split())))
ans = 0
for i in range(n, n*3, 2):
    ans += a[i]
print(ans)
Buggy code:
N = int(input())
a = sorted(list(map(int, input().split())))[::-1]

ans = 0
for i in range(N):
    ans += a[1+3*i]

print(ans)


Fixed code:
N = int(input())
a = sorted(list(map(int, input().split())))[::-1]

ans = 0
for i in range(N):
    ans += a[1+2*i]

print(ans)
Buggy code:
n = int(input())
a = sorted(list(map(int, input().split())), reverse=True)

print(a[1:n*2:2])

Fixed code:
n = int(input())
a = sorted(list(map(int, input().split())), reverse=True)

print(sum(a[1:n*2:2]))
Buggy code:
n = int(input())
a = sorted(list(map(int,input().split())),reverse=True)
sum_a = 0
for i in range(1,2*n+1,2):
    print(a[i])
    sum_a += a[i]
print(sum_a)

Fixed code:
n = int(input())
a = sorted(list(map(int, input().split())), reverse=True)
ans = 0

for i in range(n):
    ans += a[i * 2 + 1]

print(ans)
Buggy code:
n = int(input())
A = list(map(int,input().split()))
A.sort()
A = A[3:]
res = 0
for i in range(n):
    res += A[i*2]
print(res)

Fixed code:
n = int(input())
A = list(map(int,input().split()))
A.sort()
A = A[n:]
res = 0
for i in range(n):
    res += A[i*2]
print(res)
Buggy code:
N = int(input())
a = sorted(map(int, input().split())) [::-1]
ans = 0
for i in range(0, 3*N, 2):
  ans += a[i+1]
print(ans)

Fixed code:
N = int(input())
a = sorted(map(int, input().split())) [::-1]
ans = 0
cnt = 0
for i in range(0, 3*N, 2):
  ans += a[i+1]
  cnt += 1
  if cnt == N:
    break
print(ans)
Buggy code:
N = int(input())
A = sorted(
  list(map(int,input().split())) )

print(sum([A[N-i*2-2] for i in range(N) ]))

Fixed code:
N = int(input())
A = sorted(
    list(map(int, input().split())))

print(sum([A[-i*2-2] for i in range(N)]))
Buggy code:
n=int(input())
a=list(map(int,input().split()))
a.sort()
ans=0
for i in range(3*n-2,2*n,-2):
  ans+=a[i]
print(ans)

Fixed code:
n = int(input())
a = list(map(int, input().split()))
ans = 0
a.sort()
for i in range(1, n+1) :
    ans += a[-2*i]
print(ans)
Buggy code:
n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
print(sum[1:2*n+2:2])

Fixed code:
n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
print(sum(a[1:2*n:2]))
Buggy code:
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)

r = 0
for i in range(0, 3*n, 3):
    r += a[i+1]
print(r)

Fixed code:
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
r = 0
for i in range(n):
    r += a[2*i+1]
print(r)
Buggy code:
n = int(input())
a = sorted(list(map(int, input().split())))

syo = a[0:n]
tyu = a[n:2*n]
dai = a[2*n:3*n]

l = a[n:3*n]
sec = l[0::2]

print(sum(l))


Fixed code:
n = int(input())
a = sorted(list(map(int, input().split())))

syo = a[0:n]
tyu = a[n:2*n]
dai = a[2*n:3*n]

l = a[n:3*n]
sec = l[0::2]

print(sum(sec))
Buggy code:
N = int(input())
A = sorted([int(i) for i in input().split()])
A.reverse()
print(sum(A[1:2*N+2:2]))

Fixed code:
N = int(input())
A = sorted([int(i) for i in input().split()])
A.reverse()
print(sum(A[1:2*N:2]))
Buggy code:
N=int(input())
A=list(map(int,input().split()))
A.sort()
Ans=0
for i in range(N):
    Ans+=A[3*N-1-2*i]
print(Ans)

Fixed code:
N=int(input())
A=list(map(int,input().split()))
A.sort()
Ans=0
for i in range(N):
    Ans+=A[3*N-2-2*i]
print(Ans)
Buggy code:
n = int(input())

print((1 + n) / 2)


Fixed code:
n = int(input())
n = n*(n+1)/2
print(int(n))
Buggy code:
#!/usr/bin/env python3
def main():
  a = int(input())
  print(((a+1)*a)/2)

if __name__=='__main__':main()

Fixed code:
#!/usr/bin/env python3
def main():
  a = int(input())
  print(int(((a+1)*a)/2))

if __name__=='__main__':main()
Buggy code:
N = int(input())

print((N+1)*(N//2))

Fixed code:
N = int(input())
cnt = N *(1+N)//2
print(cnt)
Buggy code:
n = int(input())

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


Fixed code:
n = int(input())

print(round(n*(n+1)/2))
Buggy code:
N = int(input())
print(0.5*n*(n+1))

Fixed code:
N = int(input())
print(int(0.5*N*(N+1)))
Buggy code:
n =int,input()

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

Fixed code:
n = int(input())

print((n + 1) * n // 2)
Buggy code:
N = int(input())
print( N*(N+1)/2)

Fixed code:
N = int(input())
print(int((1 + N) * N / 2))
Buggy code:
a=int(input())
ans=a*(a+1)/2
print(ans)


Fixed code:
a=int(input())
ans=a*(a+1)//2
print(ans)
Buggy code:
N = int(input())

answer = (N + 1) * N / 2

print(answer)

Fixed code:
N = int(input())

print(int((N * (N + 1)) / 2))
Buggy code:
n = int(input())
print(((n)*(n+1))/2)

Fixed code:
n = int(input())
print(((n)*(n+1))//2)
Buggy code:
n = int(input())

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

Fixed code:
n = int(input())
print(int((n * (2 * 1 + (n -1)*1))/2))
Buggy code:
n = int (input())
print (n*(n+1)/2))


Fixed code:
n = int(input())

cand = (1 + n)*n / 2

print(int(cand))
Buggy code:
n = input()
print (1 + n) * (n / 2)

Fixed code:
n = int(input())
print(int((n+1)*(n/2)))
Buggy code:
n = int(input())
print((1+n)*n*(1/2))

Fixed code:
n = int(input())
print((n + 1) * n // 2)
Buggy code:
print((N=int(input()) * (N+1) /2)

Fixed code:
N = int(input())
print(int(N * (N + 1)/ 2))
Buggy code:
a=int(input())

print(a*(a+1)/2)

Fixed code:
a=int(input())

print(int(a*(a+1)/2))
Buggy code:
n = int(input())
print((n + 1) * n / 2)

Fixed code:
n = int(input())
print(int((n + 1) * n / 2))
Buggy code:
a=int(input())
s=a*(a+1)/2
print(s)

Fixed code:
s=int(input())
print(int(s*(s+1)/2))
Buggy code:
n = int(input())

print((n+1)/2)

Fixed code:
n= int(input())
print(int(n*(n+1)/2))
Buggy code:
x = int(input())

print((x+1)*x/2)

Fixed code:
x = int(input())
 
print(int((x+1)*x/2))
Buggy code:
i = int(input())
print(i*(i + 1) /2)

Fixed code:
i = int(input())
print(int(i*(i + 1) /2))
Buggy code:
n = int(input())
print((1 + n) * n / 2)

Fixed code:
n=int(input())
sum=n*(n+1)/2
print(int(sum))
Buggy code:
N = int(input())

ans = N*(N+1)/2
print(ans)

Fixed code:
N =int(input())
print(int(N*(N+1)/2))
Buggy code:
a = int(input())

ans = (1+a)*a/2

print(a)

Fixed code:
a=int(input())
print((a*(a+1))//2)
Buggy code:
n=int(input())
print(n*(n+1)/2)

Fixed code:
n = int(input())
print((1+n)*n // 2)
Buggy code:
N = input()
print(N*(N+1)/2)

Fixed code:
N = int(input())

print(((1 + N)* N) // 2)
Buggy code:
# -*- coding: utf-8-*-

N = int(input())

print(N*(N+1)/2)

Fixed code:
# -*- coding: utf-8-*-

N = int(input())

print(int(N*(N+1)/2))
Buggy code:
N = int(input())

print((N*(N+1)//2)

Fixed code:
N=int(input())

Z=N*(N+1)/2
print(int(Z))
Buggy code:
N = int(input())
ans = N * (N + 1) / 2
print(ans)

Fixed code:
N = int(input())
ans = int(N * (N + 1) / 2)
print(ans)
Buggy code:
N = input()
print(1/2*int(N)*(int(N)+1))

Fixed code:
N = int(input())
S = int(N*(N+1)/2)
print(S)
Buggy code:
N = int(input())
a = 1/2*N*(N+1)
print(a)

Fixed code:
N = int(input())
print(int((1 + N) * (N / 2)))
Buggy code:

x = int(input())

print(x*(x+1)/2)

Fixed code:

x = int(input())

print(int(x*(x+1)/2))
Buggy code:
n = int(input())
print((n*(n+1))/2)

Fixed code:
n = int(input())
a = n * (n+1) / 2
print(int(a))
Buggy code:
n=int(input())
print((n+1)*(n//2) + ((n+1)/2)*(n%2))

Fixed code:
n=int(input())
print((n+1)*(n//2) + ((n+1)//2)*(n%2))
Buggy code:
N = int(input())
print(N * (N + 1)/2)

Fixed code:
N = int(input())
print (N * (N + 1) // 2)
Buggy code:
N=input()
N=int(N)

answer=(N+1)*N/2

print(answer)

Fixed code:
N = int(input())
answer = (N + 1) * N // 2
print(answer)
Buggy code:
N=int(input())

x=(N+1)*N/2

print(x)

Fixed code:
N = int(input())
x = int(((N + 1) * N / 2))
print(x)
Buggy code:
N = int(input())
if N % 2 == 0:
  print((N + 1) * N / 2)
else:
  print((N) * (N - 1) / 2) + N

Fixed code:
N = int(input())
if N % 2 == 0:
  r = (N + 1) * N / 2
else:
  r = N * (N - 1) / 2 + N

print(int(r))
Buggy code:
#!/usr/bin/env python

N = int(input())
print(N * (N + 1) / 2)


Fixed code:
#!/usr/bin/env python

N = int(input())
print(N * (N + 1) // 2)
Buggy code:
n=int(input())
print(n*(n+1)/2)


Fixed code:
n=int(input())
print((n*n+n)//2)
Buggy code:
n=int(input())

ans=n*(n+1)/2

print(ans)

Fixed code:
n=int(input())

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

print(ans)
Buggy code:
val1=int(input())

print(val1*(val1+1)/)

Fixed code:
val1=int(input())
print(int(val1*(val1+1)/2))
Buggy code:
print((lambda x: int(x)*(int(x)+1)/2)(   input()))

Fixed code:
print((lambda x: int(x)*(int(x)+1)//2)(   input()))
Buggy code:
n=input()
n=int(n)
print(n*(1+n)/2)

Fixed code:
n=input()
n=int(n)
print(n*(1+n)//2)
Buggy code:
num = int(input())
print( num * (num+1) / 2 )

Fixed code:
num = int(input())
print(int( num * (num+1) / 2 ))
Buggy code:
N=int(input())
print(n*(n+1)/2)

Fixed code:
n = int(input())
print (n*(n+1)//2)
Buggy code:
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(input())
def pli(a): return "".join(list(map(str, a)))

n = ri()
print(n(n+1)/2)

Fixed code:
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(input())
def pli(a): return "".join(list(map(str, a)))

n = ri()
print(n*(n+1)//2)
Buggy code:
def candy(N):
    return (N**2 +N)/2

N = int(input())
print(candy(N))

Fixed code:
def candy(N):
    return (N**2 +N)//2

N = int(input())
print(candy(N))
Buggy code:
N = int(input())
print(int(N * (N+1) / 2)


Fixed code:
N = int(input())
print((N*(N+1)//2))
Buggy code:
n = int(input())
print((n+1)*n/2)


Fixed code:
n = int(input())

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

print(ans)
Buggy code:
s = int(input())
if s == 1:
  print(1)
else:
  print(int((1+s)*n/2))
  

Fixed code:
s = int(input())
if s == 1:
  print(1)
else:
  print(int((1+s)*s/2))
Buggy code:
x=int(input())
print((x/2)*(x+1))

Fixed code:
x=int(input())
print((x*(x+1))//2)
Buggy code:
N = int(input())
S = N*(N+1)/2
print(S)

Fixed code:
N = int(input())
print(N * (N+1)//2)
Buggy code:
n=int(input())
print(int (n(n+1)/2))

Fixed code:
n=int(input())
print(int (n*(n+1)/2))
Buggy code:
a = int(input())
print((a + 1)*a / 2)

Fixed code:
a = int(input())
print(int((a + 1)*a / 2))
Buggy code:
N = int(input())

answer = (N + 1 ) * N / 2

print(answer)

Fixed code:
N =int(input())

print(N * (N+1) // 2)
Buggy code:
n = int(input())

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

Fixed code:
n= int(input())
print(int((1+n)*n/2))
Buggy code:
a=int(input())
S=(N+1)*N/2
print(S)

Fixed code:
N=int(input())
S=(N+1)*N//2
print(S)
Buggy code:
N = int(input())

if N%2==0:
  print((N+1)*N/2)
else:
  print((N+1)*N//2+(N-N//2))

Fixed code:
N = int(input())

if N%2==0:
  print(int((N+1)*N/2))
else:
  print(int((N+1)*(N//2)+(N-N//2)))
Buggy code:
N = int(input())
print(N * (1 + N) / 2)

Fixed code:
N = int(input())

print (N*(N+1)//2)
Buggy code:
def total(n):
  return 1/2 * n * (n + 1)

n = int(input())
print(total(n))

Fixed code:
def total(n):
  return int(1/2 * n * (n + 1))
 
n = int(input())
print(total(n))
Buggy code:
N = int(input())

print((1 + N) * N / 2)

Fixed code:
N = int(input())

print(int((1 + N) * N / 2))
Buggy code:
n = int(input())
print(((1 + n) * n) / 2)


Fixed code:
n = int(input())
print(int(((1 + n) * n) / 2))
Buggy code:
number = int(input())
print(number * (number + 1) / 2)


Fixed code:
number = int(input())

print(int((number + 1)*number/2))
Buggy code:
n=input()
s=(n*(n+1))/2
print(s)

Fixed code:
n=int(input())
s=n*(n+1)/2
print(int(s))
Buggy code:
n=int(input())
print((n*(n+1))/2)

Fixed code:
n = int(input())
ans = n * (n + 1) // 2
print(ans)
Buggy code:
N = int(input())
print((N*(N+1)/2))



Fixed code:
N = int(input())
print(round(N*(N+1)/2))
Buggy code:
n=int(input())

print((1+N)*N//2)

Fixed code:
N = int(input())
print((1 + N) * N // 2)
Buggy code:
n=int(input());print(n(n+1)//2)

Fixed code:
n=int(input());print((n*(n+1))//2)
Buggy code:
a=int(input())
print((a+1)*a/2)

Fixed code:
a=int(input())
print(int((a+1)*a/2))
Buggy code:
N=int(input())
print(N*N+1/2)

Fixed code:
N = int(input())
print(int(N * (N + 1 ) / 2))
Buggy code:
N = int(input)
print(N * (N + 1)//2)

Fixed code:
N=int(input())
ans=N*(N+1)//2
print(ans)
Buggy code:
#coding:utf-8

n = int(input())
print((n*(n-1))//2)

Fixed code:
#coding:utf-8

n = int(input())
print((n*(n+1))//2)
Buggy code:
# -*- coding: utf-8 -*-


def main():
    """Function."""
    n = int(input())
    print((2*n + 1)*n//2)


if __name__ == "__main__":
    main()


Fixed code:
# -*- coding: utf-8 -*-


def main():
    """Function."""
    n = int(input())
    print((n + 1)*n//2)


if __name__ == "__main__":
    main()
Buggy code:
n=input()
print(1/2*n+(n+1))

Fixed code:
n = int(input())
print(n * (n + 1) // 2)
Buggy code:
def main():
    import sys
    
    n = int(sys.stdin.readline())
    
    print(n*(n+1)/2)
    
if __name__ == "__main__":
    main()

Fixed code:
import sys

n = int(sys.stdin.readline().rstrip())

def main():
    ans = (1 + n) * n // 2
    print(ans)

if __name__ ==  '__main__':
    main()
Buggy code:
n = int(input())
if n!=1:
  print(n*(n+1)/2)
else:
  print(1)

Fixed code:
n = int(input())
if n!=1:
  print(int(n*(n+1)/2))
else:
  print(1)
Buggy code:
n = int(input())
print(int(n*(n+1)/2)

Fixed code:
print((n:=int(input()))*(n+1)//2)
Buggy code:
N = int(input())

print(N*(N+1)/2)

Fixed code:
N=int(input())
print((N*(N+1))//2)
Buggy code:
n =input()
print((n+1) * n //2)

Fixed code:
n = int(input())
print(int(n * (n+1)/2))
Buggy code:
num = int(input())
sum = (num + 1) * num / 2
print(sum)

Fixed code:
num = int(input())
sum = (num + 1) * num / 2
print(int(sum))
Buggy code:
N = int(input())

print(N * (N+1) / 2)

Fixed code:
N = int(input())

print(int(N * (N+1) / 2))
Buggy code:
subin = int(input())
print(((1+subin) * subin) / 2)


Fixed code:
subin = int(input())
res = int((1+subin) * subin / 2)
print(res)
Buggy code:
N=int(input());print(N*(N+1/2))

Fixed code:
N = int(input())

print( N * (N + 1) // 2)
Buggy code:
N = int(input())
S = N*N/2+N/2
print(S)

Fixed code:
N = int(input())
S = int(N*N/2+N/2)
print(S)
Buggy code:
n = int(input())
print((1 + n) * n /2 )

Fixed code:
n = int(input())
print(int((1 + n) * n /2 ))
Buggy code:
N=int(input())
print(N*(N+1)*1/2)


Fixed code:
N = int(input())
a = 1
print(int(((a + N) / 2) * N))
Buggy code:
n = int(input())
print(n*(n + 1) // 2

Fixed code:
n = int(input())
print(n*(n + 1) // 2)
Buggy code:
N = int(input())
print(N*(N+1)/2)


Fixed code:
N = int(input())

print((1 + N) * N // 2)
Buggy code:
n=int(input())

m=n-(n-1)
print((n/2)*(n+m))

Fixed code:
n=int(input())

m=n-(n-1)
print(int((n/2)*(n+m)))
Buggy code:
num = int(input())
ans = num * (num+1) / 2
print(ans)

Fixed code:
num = int(input())
ans = int(num * (num + 1) / 2)
print(ans)
Buggy code:
a=input()
a=int(a)
b=(a*(a+1))/2
print(b)

Fixed code:
a=input()
a=int(a)
b=(a*(a+1))//2
print(b)
Buggy code:
N = input()
print(int(N)*(int(N)+1)/2)


Fixed code:
N = int(input())  

print( int(N*(N + 1) /2) )
Buggy code:
n = int(input())

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


Fixed code:
n = int(input())
print(int((1+n)*n/2))
Buggy code:
n = int(input())
print("{}".format(n*(n+1)/2))

Fixed code:
n = int(input())
print("{}".format(int(n*(n+1)/2)))
Buggy code:
a = input()
print a*(a+1)/2


Fixed code:
a = int(input())
print(a*(a+1)//2)
Buggy code:
n=int(input())
print((n+1)*n/2)

Fixed code:
n=int(input())
print(int((n+1)*n/2))
Buggy code:
a = input(int())

print(a*(a+1)/2)

Fixed code:
a = int(input())

print(int(a*(a+1)/2))
Buggy code:
n = input()
print((n*(n+1))/2)

Fixed code:
n=int(input())
     
print(int(n*(n+1)/2))
Buggy code:
n=int(input())

sum=n*(n+1)/2

print(sum)

Fixed code:
n=int(input())
     
sum=n*(n+1)/2
     
print(int(sum))
Buggy code:
N = int(input())

print((N*(N+1))/2)

Fixed code:
N = int(input())
a = int(N * ( N + 1 ) / 2)
print(a)
Buggy code:
N = int(input())
result = (N + 1) * N / 2
print(result)

Fixed code:
N = int(input())
print(int(1/2*N*(N+1)))
Buggy code:
a = int(input())
print((a*a+1)//2)

Fixed code:
a = int(input())
print((a+1)*a//2)
Buggy code:
N = int(input())

print(N * (N+1)/2)

Fixed code:
N = int(input())
print( N*(N+1)//2)
Buggy code:
if __name__ == "__main__":
    n = int(input())
    print(n * (n + 1)/2)

Fixed code:
if __name__ == "__main__":
    n = int(input())
    print(n * (n + 1)//2)
Buggy code:
n = int(input())

candy = n*(n+1)/2

print(candy)

Fixed code:
n = int(input())
print(int((1+n) * (n/2)))
Buggy code:
N = int(input())
print((1 + N) * N / 2)


Fixed code:
N = int(input())
sum = int(N*(N+1)/2)
print(sum)
Buggy code:
x = int(input())
print((1+x)*x/2)

Fixed code:
x = int(input())
print(int((1+x)*x/2))
Buggy code:
N=int(input())
print(int(N)*(int(N)+1)/2)

Fixed code:
N = int(input())

print(N*(N+1)//2)
Buggy code:
def main():
    n = input()
    print((n * (n + 1)) / 2)
if __name__ == '__main__':
    main()

Fixed code:
def main():
    n = int(input())
    print(int((n * (n + 1)) / 2))
if __name__ == '__main__':
    main()
Buggy code:
n = int(input())
print(n(n+1)/2)

Fixed code:
n = int(input()) 
print(n*(n+1)//2)
Buggy code:
print((n=int(input()))*-~n>>1)

Fixed code:
n=int(input());print(n*-~n>>1)
Buggy code:
n = int(input())

ans = n(1+n)/2
print(ans)

Fixed code:
n = int(input())

ans = int(n * (1 + n) / 2)
print(ans)
Buggy code:
n = int(input())

ans = n*(1+n)/2
print(ans)


Fixed code:
n = int(input())
print(n * (1 + n) // 2)
Buggy code:
N = int(input())

candy=N*(1+N)/2
print(candy)

Fixed code:
N = int(input())
print((1+N)*N//2)
Buggy code:
n = int( input() )

sum = ( n + 1 ) * n * 0.5
print( sum )


Fixed code:
n = int( input() )

print( int((n+1)*n*0.5) )
Buggy code:
n=int(input())
ans=n*(n+1)/2
print(ans)


Fixed code:
n = int(input())

print(n*(1+n)//2)
Buggy code:
N=int(input())

out=(N+1)*N/2
print(out)

Fixed code:
N=int(input())

out=int((N+1)*N/2)
print(out)
Buggy code:
num = int(input())
print((1+num)*num/2)

Fixed code:
num = int(input())
print((1+num)*num//2)
Buggy code:
n=input()
print(n*(n+1)//2)


Fixed code:
n = int(input())
print(int(n * (n+1) / 2))
Buggy code:
N = int(input())
print((N + 1) * N / 2)

Fixed code:
N = int(input())
print((N+1)*N // 2)
Buggy code:
i = int(input())
print((i+1)*i/2)

Fixed code:
i = int(input())
print(int((i+1)*i/2))
Buggy code:
N = int(input())
print(N*(N+1)/2)

Fixed code:
N = int(input()) 

print((1+N)*N//2)
Buggy code:
N=int(input())

print(0.5*N*(N+1))

Fixed code:
N=int(input())

print(int(0.5*N*(N+1)))
Buggy code:
from itertools import combinations, product


def gcd(a, b):
    if a < b:
        a, b = b, a
    while b != 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd(a, b)


def get(fmt):
    ps = input().split()
    r = []
    for p, t in zip(ps, fmt):
        if t == "i":
            r.append(int(p))
        if t == "f":
            r.append(float(p))
        if t == "s":
            r.append(p)
    if len(r) == 1:
        r = r[0]
    return r

def put(*args, **kwargs):
    print(*args, **kwargs)


def rep(n, f, *args, **kwargs):
    return [f(*args, **kwargs) for _ in range(n)]
    
def rep_im(n, v):
    return rep(n, lambda: v)
    
YES_NO = ["NO", "YES"]


N = get("i")

put(N * (N - 1) // 2)


Fixed code:
from itertools import combinations, product


def gcd(a, b):
    if a < b:
        a, b = b, a
    while b != 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd(a, b)


def get(fmt):
    ps = input().split()
    r = []
    for p, t in zip(ps, fmt):
        if t == "i":
            r.append(int(p))
        if t == "f":
            r.append(float(p))
        if t == "s":
            r.append(p)
    if len(r) == 1:
        r = r[0]
    return r

def put(*args, **kwargs):
    print(*args, **kwargs)


def rep(n, f, *args, **kwargs):
    return [f(*args, **kwargs) for _ in range(n)]
    
def rep_im(n, v):
    return rep(n, lambda: v)
    
YES_NO = ["NO", "YES"]


N = get("i")

put(N * (N + 1) // 2)
Buggy code:
n=int(input())
a=n*(n+1)/2
print(a)

Fixed code:
a = int(input())
print(a * (a+1) // 2)
Buggy code:
N = input()
print(N * (N + 1) / 2)


Fixed code:
N = int(input())
print(int((N+1)*N/2))
Buggy code:
n = int(input())
print((n*(n+1)/2)

Fixed code:
n = int(input())
print(int(n * (n+1) / 2))
Buggy code:
a = input()

sol = a * (a + 1) / 2

print( sol )

Fixed code:
a = int( input() )

sol = a * ( a + 1 ) // 2 

print( sol )
Buggy code:
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
n = ni()
print((n*(n+1))/2)


Fixed code:
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
n = ni()
print(int((n*(n+1))/2))
Buggy code:
x = int(input())
y = (x + 1)*x/2
print(y)

Fixed code:
x = int(input())
y = (x + 1)*x
print(int(y/2))
Buggy code:
n=int(input())
print(int(n*n+1/2))

Fixed code:
n=int(input())
d=n*(n+1)/2
print(int(d))
Buggy code:
a = int(input())
b = a * (a + 1 ) /2
print(b)

Fixed code:
a=int(input())
print(int(a*(a+1)/2))
Buggy code:
n = int(input())
if n == 1:
  print(n)
else:
  print(n * (n + 1) / 2)


Fixed code:
n = int(input())
if n == 1:
  print(n)
else:
  print(int(n * (n + 1) / 2))
Buggy code:
n = input()
ans = int(n * (n + 1) / 2)
print(ans)

Fixed code:
n = int(input())
ans = int(n * (n + 1) /2)
print(ans)
Buggy code:
# coding:utf-8

n = int(input())
candy = (1 + n) * n / 2

print(candy)

Fixed code:
# coding:utf-8

n = int(input())
candy = (1 + n) * n // 2

print(candy)
Buggy code:
N = int(input())
print(N * (N+1) / 2)


Fixed code:
N = int(input())
print(int(N * (N+1) / 2))
Buggy code:
n=input()
print(n*(n+1)//2)

Fixed code:
n=int(input())
print((1+n)*n//2)
Buggy code:
N=int(input())

a=N*(N+1)/2

print(a)

Fixed code:
N = int(input())
print( int((1 + N) * N /2) )
Buggy code:
N = int(input())
print(N * (N + 1) / 2)

Fixed code:
N=int(input())
ans=(N*(N+1))//2
print(ans)
Buggy code:
N = int(input())

Answer = (N*(N+1)/2)

print(Answer)

Fixed code:
N = int(input())

Answer = N * (N + 1) // 2
print(Answer)