Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03136 (python)

Fixed submission:
n = int(input())
l = sorted([int(i) for i in input().split()])
if l[-1] < sum(l)-l[-1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
l = sorted([int(i) for i in input().split()])
if l[-1] < sum(l-l[-1]):
    print("Yes")
else:
    print("No")
Problem p03212 (python)

Fixed submission:
n = int(input())

import bisect
l = []
def dfs(num, index):
    if index == 9:
        if (num.find("3") != -1) and (num.find("5") != -1) and (num.find("7") != -1):
            l.append(int(num))
        return 0
        
    if num == "":
        ret0 = dfs(num + "" , index+1)
    ret1 = dfs(num + "3", index+1)
    ret2 = dfs(num + "5", index+1)
    ret3 = dfs(num + "7", index+1)

    return 0

dfs("", 0)

print (bisect.bisect_right(l,n))

Buggy submission (verdict: Runtime Error):
n = int(input())

import bisect
l = []
def dfs(num, index):
    if index == 9:
        if (num.find("3") != -1) and (num.find("5") != -1) and (num.find("7") != -1):
            l.append(int(num))
        return 0
        
    if num == "":
        ret0 = dfs(num + "" , index+1)
    ret1 = dfs(num + "3", index+1)
    ret2 = dfs(num + "5", index+1)
    ret3 = dfs(num + "7", index+1)

    return 0

dfs("", 0)

count = bisect.bisect_left(l,n)
count += 1 if n == l[bisect.bisect_left(l,n)] else 0
print (count)
Problem p03261 (python)

Fixed submission:
n = int(input()) 
a = [input() for i in range(n)] 

used = [a[0]]
pre = a[0]
for i in a[1:]:
    if i not in used and pre[-1] == i[0]:
        used.append(i)
        pre = i
    else:
        print("No")
        exit()

print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(input()) 
a = [int(input()) for i in range(n)] 

used = [a[0]]
pre = a[0]
for i in a[1:]:
    if i not in used and pre[-1] == i[0]:
        used.append(i)
        pre = i
    else:
        print("No")
        exit()

print("Yes")
Problem p03273 (python)

Fixed submission:
H, W = (int(i) for i in input().split())
e = [input() for i in range(H)] 

new_e = []
for row in e:
    if row.count("#") > 0:
        new_e.append(row)

use_col = []
for row in new_e:
    for col in range(W):
        if row[col] == "#" and col not in use_col:
            use_col.append(col)
            
for row in new_e:
    x=""
    for col in sorted(use_col):
        x += row[col]
    print(x)

Buggy submission (verdict: Runtime Error):
H, W = (int(i) for i in input().split())
e = [input() for i in range(H)] 

new_e = []
for row in e:
    if row.count("#") > 0:
        new_e.append(row)

not_use_col = list(range(W))
use_col = []
for row in new_e:
    for col in not_use_col:
        if row[col] == "#":
            use_col.append(not_use_col.pop(col))
            break

for row in new_e:
    x=""
    for col in use_col:
        x += row[col]
    print(x)
Problem p03289 (python)

Fixed submission:
s = input()

if s[0] != "A":
    print("WA")
    exit()

if s[1].isupper() or s[-1].isupper():
    print("WA")
    exit()

count = 0
for s_ in s[2:]:
    if s_.isupper():
        if s_ == "C":
            count += 1
        else:
            print("WA")
            exit()
        

if count == 1:
    print("AC")
else:
    print("WA")

Buggy submission (verdict: Runtime Error):
s = input()

if s[0] != "A":
    print("WA")
    exit()

if s[1].isupper() or s[-1].isupper():
    print("WA")
    exit()

count = 0
for i in s[2:]:
    if s[i].isupper():
        if s[i] == "C":
            count += 1
        else:
            print("WA")
            exit()
        

if count == 1:
    print("AC")
else:
    print("WA")
Problem p03469 (python)

Fixed submission:
s = input().replace("2017", "2018")
print(s)

Buggy submission (verdict: Runtime Error):
s = input()

s[3] = "8"
print(s)
Problem p03478 (python)

Fixed submission:
n, a, b = (int(i) for i in input().split())

l = []
for i in range(n+1):
    s = str(i)
    sum_ = 0
    for x in s:
        sum_ += int(x)
    
    if a <= sum_ and sum_ <= b:
        l.append(i)

print(sum(l))

Buggy submission (verdict: Runtime Error):
n, a, b = (int(i) for i in input().split())

l = []
for i in range(n+1):
    s = str(i)
    sum_ = 0
    for x in s:
        sum_ += int(X)
    
    if a <= sum_ and sum_ <= b:
        l.append(i)

print(sum(l))
Problem p03605 (python)

Fixed submission:
n = input()
if n[0] == "9" or n[1] == "9":
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = input()
if n[0] == "9" or n[1] == "9"
    print("Yes")
else:
    print("No")
Problem p03632 (python)

Fixed submission:
a, b, c, d = (int(i) for i in input().split())

print(max(min(b,d)-(max(a,c)), 0))

Buggy submission (verdict: Runtime Error):
a, b, c, d = (int(i) for i in input().split())

print(max(min(b,d)-(max(a,c), 0))
Problem p03645 (python)

Fixed submission:
import sys
input = sys.stdin.readline
n,m = (int(i) for i in input().split())
ab = [[int(i)-1 for i in input().split()] for i in range(m)]

ab = list(filter(lambda x:x[0]==0 or x[1]==n-1, ab))
ab0 = list(filter(lambda x:x[0]==0,ab))
abn = list(filter(lambda x:x[1]==n-1,ab))

ab0_bin = ["0"]*n
abn_bin = ["0"]*n
for x in ab0:
    ab0_bin[x[1]] = "1"
for x in abn:
    abn_bin[x[0]] = "1"

ab0_bin = "".join(ab0_bin)
abn_bin = "".join(abn_bin)

if bin(int(ab0_bin,2) & int(abn_bin, 2))[2:].count("1") > 0:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
import numpy as np
import sys
input = sys.stdin.readline
n,m = (int(i) for i in input().split())
ab = [[int(i)-1 for i in input().split()] for i in range(m)]

mat = np.zeros((n,n))
for x in ab:
    mat[x[0]][x[1]] = 1
    mat[x[1]][x[0]] = 1
vec = np.zeros(n)
vec[0] = 1
vec[-1] = 1
if list(mat.dot(vec)).count(2) > 0:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
Problem p03773 (python)

Fixed submission:
a, b = (int(i) for i in input().split())
 
res = a+b
if res > 23:
    print(res-24)
else:
    print(res)

Buggy submission (verdict: Runtime Error):
a, b = (int(i) for i in input().split())

res = a+b
if res > 23
    print(res-24)
else:
    print(res)
Problem p03853 (python)

Fixed submission:
h,w= (int(i) for i in input().split())
c = [input() for i in range(h)]

for x in c:
    print(x)
    print(x)

Buggy submission (verdict: Runtime Error):
h,w= (int(i) for i in input().split())
c = [int(input()) for i in range(h)]

for x in c:
    print(x)
    print(x)
Problem p03574 (python)

Fixed submission:
H,W = map(int,input().split())
mine_map = [list(input()) for x in range(H)]
for i in range(H):
  for j in range(W):
    count = 0
    if mine_map[i][j] == ".":
      for k in range(-1,2):
        for l in range(-1,2):
          if i+k >= 0 and i+k < H and j+l >= 0 and j+l < W:
            if mine_map[i+k][j+l] == "#":
              count += 1
      mine_map[i][j] = count
    print(mine_map[i][j],end="")
  print()

Buggy submission (verdict: Runtime Error):
H,W = map(int,input().split())
mine_map = [list(input().split()) for x in range(H)]
for i in range(H):
  for j in range(W):
    count = 0
    if mine_map[i][j] == ".":
      for k in range(-1,2):
        for l in range(-1,2):
          if i+k >= 0 and i+k < H and j+l >= 0 and j+l < W:
            if mine_map[i+k][j+l] == "#":
              count += 1
      mine_map[i][j] = count
    print(mine_map[i][j],end="")
  print()

Buggy submission (verdict: Runtime Error):
H,W = map(int,input().split())
mine_map = [list(input().split()) for x in range(H)]
for i in range(H):
  for j in range(W):
    count = 0
    if mine_map[i][j] == ".":
      for k in range(-1,2):
        for l in range(-1,2):
          if i+k >= 0 and i+k < H and j+l >= 0 and j+l < W:
            if mine_map[i+k][j+l] == "#":
              count += 1
      mine_map[i][j] = count
    print(mine_map[i][j],end="")
  print("")
Problem p03575 (python)

Fixed submission:
def dfs(num):
  global visited
  for next_num in edge[num]:
    if visited[next_num]:
      continue
    if has_edge[num][next_num]:
      visited[next_num]=1
      dfs(next_num)
      
N,M = map(int,input().split())
ab = []
edge = [[] for x in range(N+1)]
has_edge = [[0 for x in range(N+1)] for x in range(N+1)]
for i in range(M):
  a,b = map(int,input().split())
  ab.append([a,b])
  edge[a].append(b)
  edge[b].append(a)
  has_edge[a][b] = 1
  has_edge[b][a] = 1
  
count = 0
for a,b in ab:
  visited = [0 for x in range(N+1)]
  visited[1] = 1
  has_edge[a][b] = 0
  has_edge[b][a] = 0
  dfs(1)
  if sum(visited) != N:
    count += 1
  has_edge[a][b] = 1
  has_edge[b][a] = 1
print(count)

Buggy submission (verdict: Runtime Error):
def dfs(num):
  global visited
  for next_num in num:
    if visited[next_num]:
      continue
    if has_edge[num][next_num]:
      visited[next_num]=1
      dfs(next_num)
      
N,M = map(int,input().split())
ab = []
edge = [[] for x in range(N+1)]
has_edge = [[0 for x in range(N+1)] for x in range(N+1)]
for i in range(M):
  a,b = map(int,input().split())
  ab.append([a,b])
  edge[a].append(b)
  edge[b].append(a)
  has_edge[a][b] = 1
  has_edge[b][a] = 1
  
count = 0
for a,b in ab:
  visited = [0 for x in range(N+1)]
  visited[1] = 1
  has_edge[a][b] = 0
  has_edge[b][a] = 0
  dfs(1)
  if sum(visited) != N:
    count += 1
  has_edge[a][b] = 1
  has_edge[b][a] = 1
print(count)
Problem p02934 (python)

Fixed submission:
n=input()
a=str(input())
li = list(a.split(" "))
result = 0
for num in li:
    result += 1/int(num)
    
print(1/result)

Buggy submission (verdict: Runtime Error):
n=input()
a=list(input())
result = 0
for num in a:
    result += 1/int(num)
    
print(1/result)

Buggy submission (verdict: Runtime Error):
n=input()
a=list(input())
result = 0
for num in a:
    result += 1/num
    
print(1/result)
Problem p04011 (python)

Fixed submission:
stay = int(input())
plan_change_day =int(input())
high_price=int(input())
low_price=int(input())
 
def main():
    if stay - plan_change_day > 0:
        cost = high_price * plan_change_day + low_price * (stay - plan_change_day)
        print(int(cost))
    else:
        cost = high_price * stay
        print(int(cost))
  	    
main()

Buggy submission (verdict: Runtime Error):
stay = int(input())
plan_change_day =int(input())
high_price=int(input())
low_price=int(input())
 
def main():
	if stay - plan_change_day > 0:
		cost = high_price * plan_change_day + low_price * (stay - plan_change_day)
        print(int(cost))
    else:
        cost = high_price * plan_change_day 
  	    print(int(cost))
  	    
main()

Buggy submission (verdict: Runtime Error):
stay = int(input())
plan_change_day =int(input())
high_price=input()
low_price=input()

def main():
  cost = high_price * plan_change_day + low_price * (stay - plan_change_day)
  print(cost)
  
 main()
Problem p03110 (python)

Fixed submission:
N = int(input())
a=0
for i in range(N):
  b=input().split()
  if b[1]=="JPY":
    a+=float(b[0])
  else:
    a+=float(b[0])*380000
print(a)

Buggy submission (verdict: Runtime Error):
N = int(input())
a=0
for i in range(N):
  b=input().split()
  if b[1]=="JPY":
    a+=b[0]
  else:
    a+=b[0]*380000
print(a)
Problem p03206 (python)

Fixed submission:
a=int(input())
if 22<=a<=25:
	print("Christmas"+" Eve"*(25-a))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(input()) for i in range(n)]
print(int(sum(a)-max(a)/2))
Problem p03210 (python)

Fixed submission:
print("YES" if int(input()) in [7,5,3] else "NO")

Buggy submission (verdict: Runtime Error):

print("YES" if int(input() in [7,5,3] else "NO")
Problem p03415 (python)

Fixed submission:
a = [input() for i in range(3)]
print(a[0][0]+a[1][1]+a[2][2])

Buggy submission (verdict: Runtime Error):
a = [list(map(int, input().split())) for i in range(3)]
print(a[0][0]+a[1][1]+a[2][2])
Problem p03416 (python)

Fixed submission:
a,b=map(int, input().split())
c=0
for i in range(a,b+1):
  d=str(i)
  if d[0]==d[-1] and d[-2]==d[1]:
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
c=0
for i in range(a,b+1):
  d=str(i)
  if d[0]=d[-1] and d[-2]=d[1]:
    c+=1
print(c)
Problem p03433 (python)

Fixed submission:
a=int(input())
b=int(input())
if a%500<=b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=sorted(list(map(int,input().split())),reverse=True)
b=0
for i in range(n):
  b+=a[i]*(-1)**i
print(b)
Problem p03447 (python)

Fixed submission:
X,A,B=[int(input()) for i in range(3)]
print((X-A)%B)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
X=int(input())
a=0
for i in range(A+1):
  for j in range(B+1):
    if 0<=X-500*i-100*j<=50*C:
      a+=1
print(a)
Problem p03473 (python)

Fixed submission:
print(48-int(input()))

Buggy submission (verdict: Runtime Error):
print(48-int(input())
Problem p03477 (python)

Fixed submission:
a,b,c,d = map(int, input().split())
l=a+b
r=c+d
print("Left" if l>r else "Balanced" if l==r else "Right")

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, input().split())
l=a+b
r=c+d
printT("Left" if l>r else "Balanced" if l==r else "Right")
Problem p03494 (python)

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
b=[0]*N
for i in range(N):
  while a[i]%2==0:
    a[i]=int(a[i]/2)
    b[i]+=1
print(min(b))

Buggy submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
b=[0,0,0]
for i in range(N):
  while a[i]%2==0:
    a[i]=int(a[i]/2)
    b[i]+=1
print(min(b))
Problem p03547 (python)

Fixed submission:
x,y= input().split()
print("=" if x==y else ">" if x>y else "<")

Buggy submission (verdict: Runtime Error):
x,y= map(int, input().split())
print("=" if x==y else ">" if x>y else "<")
Problem p03555 (python)

Fixed submission:
l=[input() for i in range(2)]
print("YES" if l[0][0]==l[1][2] and l[0][1]==l[1][1] and l[0][2]==l[1][0] else "NO")

Buggy submission (verdict: Runtime Error):
l=[input() for i in range()]
print("YES" if l[0][0]==l[1][2] and l[0][1]==l[1][1] and l[0][2]==l[1][0] else "NO")
Problem p03597 (python)

Fixed submission:
N = int(input())
A = int(input())
print(N**2-A)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
print(N**2-a)
Problem p03644 (python)

Fixed submission:
N = int(input())
a=1
for i in range(6):
  if 2**(i+1)<=N:
    a=2**(i+1)
print(a)

Buggy submission (verdict: Runtime Error):
N = int(input())
for i in range(6):
  if 2**(i+1)<=N:
    a=2**(i+1)
print(a)
Problem p03657 (python)

Fixed submission:
N, K = map(int, input().split())
print("Possible" if N*K*(N+K)%3==0 else "Impossible")

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
pint("Possible" if N*K*(N+K)%3==0 else "Impossible")
Problem p03737 (python)

Fixed submission:
a,b,c=input().split()
print(a[0].upper()+b[0].upper()+c[0].upper())

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
print(a[0].upper+b[0].upper+c[0].upper)
Problem p03759 (python)

Fixed submission:
a,b,c=map(int, input().split())
print("YES" if b-a==c-b else "NO")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int, input().split())
print("YES" if b-a=c-b else "NO")
Problem p04043 (python)

Fixed submission:
a,b,c=sorted(map(int,input().split()))
print("YES" if a==b==5 and c==7 else "NO")

Buggy submission (verdict: Runtime Error):
n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print(*s,sep="")

Buggy submission (verdict: Runtime Error):
n,l=map(int,input().split())
list=sorted([input() for i in range(n)])
print(*list,sep="")

Buggy submission (verdict: Runtime Error):
n,l=map(int,input().split())
list=sorted([input() for i in range(n)])
print(*list,sep="")
Problem p03162 (python)

Fixed submission:
n = int(input())
arr = [[int(i) for i in list(input().split())] for j in range(n)]
for i in range(1,n):
	arr[i][0] += max(arr[i-1][1], arr[i-1][2])
	arr[i][2] += max(arr[i-1][1], arr[i-1][0])
	arr[i][1] += max(arr[i-1][0], arr[i-1][2])
print(max(arr[n-1]))

Buggy submission (verdict: Runtime Error):
n = int(input()
arr = [[int(i) for i in list(input().split())] for j in range(n)]
for i in range(1,n):
	arr[i][0] += max(arr[i-1][1], arr[i-1][2])
	arr[i][2] += max(arr[i-1][1], arr[i-1][0])
	arr[i][1] += max(arr[i-1][0], arr[i-1][2])
print(max(arr[n-1]))
Problem p02971 (python)

Fixed submission:
N = int(input())
A = list()

for i in range(N):
  i = int(input())
  A.append(i)
  
ma = max(A)
sa = sorted(A)

for k in range(N):
  if ma != A[k]:
    print(ma)
  else:
    print(sa[-2])

Buggy submission (verdict: Runtime Error):
A = list()
B = [0] * 200000

for i in range(N):
  i = int(input())
  A.append(i)
  
C = sorted(A,reverse=True)

for k in range(N):
  if max(A) != A[k]:
    print(C[0])
  else:
    B[k] = A[k]
    A[k] = 0
    print(max(A))
    A[k] = B[k]

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list()
B = [0] * 50

for i in range(N):
  i = int(input())
  A.append(i)

for k in range(N):
  if max(A) != A[k]:
    print(max(A))
  else:
    B[k] = A[k]
    A[k] = 0
    print(max(A))
    A[k] = B[k]
Problem p03076 (python)

Fixed submission:
import sys
import math

def main():
    input = sys.stdin.readline
    
    L = [int(input()) for i in range(5)]
    
    #最後の注文を決める
    last_orders = [10 - (i % 10) for i in L if i % 10 != 0]
    last_order = 0 if not last_orders else max(last_orders)
    
    #一の位を切り上げ
    all_order = sum([math.ceil(i / 10) * 10 for i in L])
    
    print(all_order - last_order)
    
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    input = sys.stdin.readline
    
    L = [int(input()) for i in range(5)]
    
    #最後の注文を決める
    last_orders = [10 - (i % 10) for i in L if i % 10 != 0]
    last_order = max(last_orders)
    
    #一の位を切り上げ
    all_order = sum([math.ceil(i / 10) * 10 for i in L])
    
    print(all_order - last_order)
    
if __name__ == '__main__':
    main()
Problem p03035 (python)

Fixed submission:
def solve():
    takaYear, defaultFee = map(int, input().split())
    if takaYear <= 5:
        print(0)
    elif takaYear <= 12:
        print(defaultFee//2)
    else:
        print(defaultFee)
solve()

Buggy submission (verdict: Runtime Error):
def solve():
    from operator import itemgetter

    turns = tuple(map(int, input().split()))[1]
    cardsList = sorted(list(map(int, input().split())))

    turnsList = [tuple(map(int, input().split())) for _ in range(turns)]
    for chances, num in sorted(turnsList, key=itemgetter(1), reverse=True):
        for i in range(chances):
            if num > cardsList[i]:
                cardsList[i] = num
            elif i == 0:
                return print(sum(cardsList))
            else:
                break
        cardsList.sort()
    print(sum(cardsList))
solve()
Problem p03037 (python)

Fixed submission:
def solve():
    maxCards, gates = map(int, input().split())
    gateRanges = [tuple(map(int, input().split())) for i in range(gates)]

    for i, permitRange in enumerate(gateRanges):
        if i == 0:
            activeBegin, activeEnd = permitRange
            continue
        begin, end = permitRange
        if not (begin <= activeEnd and end >= activeBegin):
            return print(0)
        else:
            activeBegin, activeEnd = max(activeBegin, begin), min(activeEnd, end)
    else:
        if (maxCards < activeBegin):
            return print(0)
        ans = min(activeEnd, maxCards) - activeBegin + 1
    print(ans)
solve()

Buggy submission (verdict: Runtime Error):
def solve():
    maxCards, gates = map(int, input().split())
    gateRanges = [tuple(map(int, input().split())) for i in range(gates)]

    for i, permitRange in enumerate(gateRanges):
        if i == 0:
            activeBegin, activeEnd = permitRange
            continue
        begin, end = permitRange
        if not (begin <= activeEnd and end >= activeBegin):
            print(0)
            break
        else:
            activeBegin, activeEnd = max(activeBegin, begin), min(activeEnd, end)
    else:
        if (maxCards < activeBegin):
            return print(0)
        ans = min(activeEnd, maxCards) - activeBegin + 1
    print(ans)
solve()

Buggy submission (verdict: Runtime Error):
def solve():
    maxCards, gates = map(int, input().split())
    gateRanges = [tuple(map(int, input().split())) for i in range(gates)]

    for i, permitRange in enumerate(gateRanges):
        if i == 0:
            activeBegin, activeEnd = permitRange
            continue
        begin, end = permitRange
        if not (begin <= activeEnd and end >= activeBegin):
            print(0)
            break
        else:
            activeBegin, activeEnd = max(activeBegin, begin), min(activeEnd, end)
    else:
        if (maxCards < activeBegin):
            return print(0)
        print(activeBegin, activeEnd)
        ans = min(activeEnd, maxCards) - activeBegin + 1
    print(ans)
solve()
Problem p03043 (python)

Fixed submission:
import math

def solve():
	diceSurfaces, winBorder = [int(x) for x in input().split()]
	diceProbability = (1 / diceSurfaces)
	ans = 0
	for score in range(1, diceSurfaces + 1):
		if score >= winBorder:
			ans += diceProbability
			continue 
		needNum  = math.ceil((winBorder) / score)
		needWins = math.ceil(math.log2(needNum))
		ans += diceProbability * ((1/2) ** needWins)
	print(ans)
solve()

Buggy submission (verdict: Runtime Error):
def solve():
	diceSurfaces, winBorder = [int(x) for x in input().split()]
	diceProbability = (1 / diceSurfaces)
	ans = 0
	for score in range(1, diceSurfaces + 1):
		if score >= winBorder:
			ans += diceProbability
			continue 
		needNum  = math.ceil((winBorder) / score)
		needWins = math.ceil(math.log2(needNum))
		ans += diceProbability * ((1/2) ** needWins)
	print(ans)
solve()
Problem p04029 (python)

Fixed submission:
N = int(input())
sum = 0
for i in range(1,N+1):
    sum = sum + i
print(sum)

Buggy submission (verdict: Runtime Error):
N = int(input())
for i in range(1,N):
  sum += i
print(sum)