Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    S = str(input())
    S += "B"
    N = len(S)
    for i in range(N-1):
        if S[i] == "B" and S[i+1] == "C":
            S = S[:i]+"DE"+S[(i+2):]
    S = S.replace("E","")
    left = 0
    count = 0
    rep = 0
    ar = 0
    N = len(S)
    for i in range(N):
        if S[i] == "D":
            count += 1
            rep += i-left
        elif S[i] == "B" or S[i] == "C":
            ar += rep-(count*(count-1)//2)
            rep = 0
            count = 0
            left = i+1

    print(ar)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    S = input().replace("BC","D")
    ans = count = 0
    for i in S:
        if i == "A":
            count += 1
        elif i == "D":
            ans += count
        else:
            count = 0

    print(ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    S = str(input())
    S += "Z"
    N = len(S)
    for i in range(N-1):
        if S[i] == "B" and S[i+1] == "C":
            S = S[:i]+"DE"+S[(i+2):]
    S = S.replace("E","")
    left = 0
    right = 0
    count = 0
    rep = 0
    ar = 0
    N = len(S)
    while right <= N-1:
        if S[right] == "A":
            right += 1
        elif S[right] == "D":
            count += 1
            rep += right-left
            right += 1
        else:
            ar += rep-(count*(count-1)//2)
            rep = 0
            count = 0
            right += 1
            left = right

    print(ar)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    S = input().replace("BC","D")
    ans = count = 0
    for i in S:
        if i == "A":
            count += 1
        elif i == "D":
            ans += count
        else:
            count = 0

    print(ans)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
N = int(input())

mylist = []
for i in range(n):
	mylist.append(list(map(str,input().split())))
	mylist[i].append(i+1)

mylist = sorted(mylist,key=lambda mylist:(mylist[0],-int(mylist[1])))
for i in mylist:
	print(i[2])

Fixed submission:
n = int(input())

mylist = []
for i in range(n):
	mylist.append(list(map(str,input().split())))
	mylist[i].append(i+1)

mylist = sorted(mylist,key=lambda mylist:(mylist[0],-int(mylist[1])))
for i in mylist:
	print(i[2])
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

def main():
    N,K = map(int,input().split())
    V = list(map(int,input().split()))
    
    ans = -(10**10)
    for pick in range(K+1):
        throw = min(pick,K-pick)
        for left in range(pick+1):
            right = pick-left
            p = []
            minus = 0
            for i in range(left):
                if V[i] < 0:
                    minus += 1
                p.append(V[i])
            for i in range(right):
                if V[-i-1] < 0:
                    minus += 1
                p.append(V[-i-1])
            p.sort()
            if minus >= throw:
                rest = p[throw:]
            else:
                rest = p[minus:]
            ans = max(ans,sum(rest))
    
    print(ans)
    
if __name__ == "__main__":
    main()


Fixed submission:
import sys
input = sys.stdin.readline

def main():
    N,K = map(int,input().split())
    V = list(map(int,input().split()))
    
    ans = -(10**10)
    for pick in range(min(N+1,K+1)):
        throw = min(pick,K-pick)
        for left in range(pick+1):
            right = pick-left
            p = []
            minus = 0
            for i in range(left):
                if V[i] < 0:
                    minus += 1
                p.append(V[i])
            for i in range(right):
                if V[-i-1] < 0:
                    minus += 1
                p.append(V[-i-1])
            p.sort()
            if minus >= throw:
                rest = p[throw:]
            else:
                rest = p[minus:]
            ans = max(ans,sum(rest))
    
    print(ans)
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
X = [list(map,int(input().split())) for i in range(M)]

keymax = 10**6
keymin = 0
for i in range(M):
	if X[i][0] > keymin:
		keymin = X[i][0]
	if X[i][1] < keymax:
		keymax = X[i][1]

print(keymax-keymin+1)

Fixed submission:
N,M = map(int,input().split())
X = [list(map(int,input().split())) for i in range(M)]

keymax = 10**6
keymin = 0
for i in range(M):
	if X[i][0] > keymin:
		keymin = X[i][0]
	if X[i][1] < keymax:
		keymax = X[i][1]

if keymax >= keymin:
	print(keymax-keymin+1)
else:
	print("0")

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())

key = [0]*N
x = [list(map(int,input().split())) for i in range(M)]

for i in range(M):
	for j in range(x[i][0],x[i][1]+1):
		key[j-1] += 1

count = 0
for k in range(N):
	if key[k] == M:
		count += 1

print(count)

Fixed submission:
N,M = map(int,input().split())
X = [list(map(int,input().split())) for i in range(M)]

keymax = 10**6
keymin = 0
for i in range(M):
	if X[i][0] > keymin:
		keymin = X[i][0]
	if X[i][1] < keymax:
		keymax = X[i][1]

if keymax >= keymin:
	print(keymax-keymin+1)
else:
	print("0")
Buggy python submission (verdict: Runtime Error):
n = input()

a = int(n[0]+n[1])
b = int(n[2]+n[3])
if b = 0 or b > 12:
	if 1 <= a <= 12:
		print("MMYY")
	else:
		print("NA")
elif 1 <= a <= 12:
	print("AMBIGUOUS")
else:
	print("YYMM")

Fixed submission:
n = input()

a = int(n[0]+n[1])
b = int(n[2]+n[3])
if b == 0 or b > 12:
	if 1 <= a <= 12:
		print("MMYY")
	else:
		print("NA")
elif 1 <= a <= 12:
	print("AMBIGUOUS")
else:
	print("YYMM")
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    X = [list(map(int,input().split())) for _ in range(N-1)]
    tree = [[] for _ in range(N+1)]
    for i in range(N-1):
        tree[X[i][0]-1].append(X[i][1])
        tree[X[i][1]-1].append(X[i][0])
    dif = [0 for _ in range(N)]
    queue = [1]
    while queue:
        i = queue.pop()
        for j in range (N-1):
            if X[j][0] == i and X[j][1] in tree[i-1]:
                dif[X[j][1]-1] = dif[i-1] + X[j][2]
                tree[X[j][1]-1].remove(i)
            if X[j][1] == i and X[j][0] in tree[i-1]:
                dif[X[j][0]-1] = dif[i-1] - X[j][2]
                tree[X[j][0]-1].remove(i)
        queue += tree[i-1]
        tree[i-1].clear()

    for i in dif:
        print(0) if i%2 == 0 else print(1)

if __name__ == "__main__":
    main()

Fixed submission:
import sys
input = sys.stdin.buffer.readline
from collections import deque

def main():
    N = int(input())
    dist = [[] for _ in range(N)]
    for i in range(N-1):
        u,v,w = map(int,input().split())
        dist[u-1].append((v-1,w%2))
        dist[v-1].append((u-1,w%2))

    go = [True for _ in range(N)]
    length = [0 for _ in range(N)]
    go[0] = False
    q = deque([0])
    while q:
        now = q.pop()
        for fol,d in dist[now]:
            if go[fol]:
                length[fol] = length[now]+d
                go[fol] = False
                q.append(fol)

    for i in length:
        print(i%2)
        
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import sys
#input = sys.stdin.buffer.readline

def main():
    N = int(input())
    s = input()
    _s = "".join(list(reversed(s)))
    if "#" not in s:
        print(0)
    else:
        sind = s.index("#")
        dind = _s.index(".")
        use = s[sind:(N-dind)]
        print(min(use.count("."),use.count("#")))

if __name__ == "__main__":
    main()

Fixed submission:
import sys
#input = sys.stdin.buffer.readline

def main():
    N = int(input())
    s = input()
    ans = s.count(".")
    count = ans
    for st in s:
        if st == "#":
            count += 1
        else:
            count -= 1
        ans = min(ans,count)
        
    print(ans)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
a,b,c,d,e,k = map(int,input().split())
 
if e - a > k:
	print(":(")
else:
	print("Yay!")

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e - a > k:
	print(":(")
else:
	print("Yay!")

Buggy python submission (verdict: Runtime Error):
a,b,c,d,e,k = map(int,input().split())

if e - a > k:
	print(":(")
else:
    print("Yay!")

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e - a > k:
	print(":(")
else:
	print("Yay!")
Buggy python submission (verdict: Time Limit Exceeded):
X,Y,Z,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort(reverse = True)
B.sort(reverse = True)
C.sort(reverse = True)
ans = []
for i in range(X):
	for j in range(Y):
		for k in range(Z):
			if ((i+1)*(j+1)*(k+1) <= K):
				ans.append(A[i]+B[j]+C[k])

ans.sort(reverse=True)
for i in range(K):
	print(ans[i])

Fixed submission:
X,Y,Z,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort(reverse = True)
B.sort(reverse = True)
C.sort(reverse = True)
ans = []
for i in range(X):
	for j in range(min(Y,K//(i+1)+1)):
		for k in range(min(Z,K//((i+1)*(j+1))+1)):
			ans.append(A[i]+B[j]+C[k])

ans.sort(reverse=True)
for i in range(K):
	print(ans[i])
Buggy python submission (verdict: Time Limit Exceeded):
N,Q = map(int,input().split())

S = input()

X = [list(map(int,input().split())) for _ in range(Q)]

for i in range(Q):
	count = 0
	for j in range(X[i][0],X[i][1]):
		if S[j-1] == "A" and S[j] == "C":
			count += 1
	print(count)

Fixed submission:
N,Q = map(int,input().split())

S = input()

X = [list(map(int,input().split())) for _ in range(Q)]

count = [0]*len(S)
for i in range(1,len(S)):
	if S[i-1] == "A" and S[i] == "C":
		count[i] = count[i-1] + 1
	else:
		count[i] = count[i-1]
        
for j in range(Q):
	ans = count[X[j][1]-1]-count[X[j][0]-1]
	print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    c = [-1]
    INF = 10**9+7
    for _ in range(N):
        a = int(input())
        if c[-1] == a:
            continue
        c.append(a)
    
    c.pop(0)
    d,M = len(c),max(c)    
    _c = list(set(c))
    
    dp = [1 for _ in range(d+1)]
    c_dp = [[0 for _ in range(d+1)] for _ in range(M+1)]
    for i in range(d):
        for j in _c:
            if c[i] != j:
                c_dp[j][i+1] = c_dp[j][i]
            else:
                dp[i+1] = (c_dp[j][i] + dp[i])%INF
                c_dp[j][i+1] = dp[i+1]
                
    print(dp[-1])
    
if __name__ == "__main__":
    main()


Fixed submission:
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    c = [-1]
    INF = 10**9+7
    for _ in range(N):
        a = int(input())
        if c[-1] == a-1:
            continue
        c.append(a-1)
    
    c.pop(0)
    d,M = len(c),max(c)
    dp = [1 for _ in range(d+1)]
    c_dp = [0 for _ in range(M+1)]
    for i in range(d):
        now = c[i]
        dp[i+1] = (dp[i] + c_dp[now])%INF
        c_dp[now] = dp[i+1]
                
    print(dp[-1])
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
A,B,K = list(map(int,input().split()))

mylist = []
for i in range(1,max(A,B)):
	if A%i == 0 and B%i == 0:
		mylist.append(i)

print(mylist[K-1])

Fixed submission:
A,B,K = map(int,input().split())

diflist = []
for i in range(1,min(A,B)+1):
	if (A%i == 0 and B%i == 0):
		diflist.append(i)

print(diflist[-K])
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.buffer.readline
import heapq
from collections import defaultdict
from operator import itemgetter

def main():
    N,K = map(int,input().split())
    sushi = []
    for _ in range(N):
        t,d = map(int,input().split())
        sushi.append((-d,t))
    sushi.sort(key=itemgetter(0))
    use,only,unuse = [],[],sushi[K:]
    neta = defaultdict(int)
    x = 0
    for i in range(K):
        d,t = sushi[i]
        if neta[t] == 0:
            only.append((-d,t))
        else:
            use.append((-d,t))
        neta[t] += 1
        x -= d
    
    l = len(neta)
    heapq.heapify(use)
    heapq.heapify(only)
    heapq.heapify(unuse)
    
    ans = x + l**2
    while (len(use) != 0 or len(unuse) != 0 or l < K):
        cd,ct = heapq.heappop(unuse)
        cd *= -1
        if neta[ct] != 0:
            continue
        heapq.heappush(only,(cd,ct))
        rd,rt = heapq.heappop(use)
        x += cd-rd
        l += 1
        neta[ct] += 1
        neta[rt] -= 1
        ans = max(ans,x+l**2)
        
    print(ans)

if __name__ == "__main__":
    main()

Fixed submission:
import sys
input = sys.stdin.buffer.readline
import heapq
from collections import defaultdict
from operator import itemgetter

def main():
    N,K = map(int,input().split())
    sushi = []
    for _ in range(N):
        t,d = map(int,input().split())
        sushi.append((-d,t))
    sushi.sort(key=itemgetter(0))
    use,only,unuse = [],[],sushi[K:]
    neta = defaultdict(int)
    x = 0
    for i in range(K):
        d,t = sushi[i]
        if neta[t] == 0:
            only.append((-d,t))
        else:
            use.append((-d,t))
        neta[t] += 1
        x -= d
    
    l = len(neta)
    heapq.heapify(use)
    heapq.heapify(only)
    heapq.heapify(unuse)
    
    ans = x + l**2
    while (len(use) != 0 and len(unuse) != 0 and l < K):
        cd,ct = heapq.heappop(unuse)
        cd *= -1
        if neta[ct] != 0:
            continue
        heapq.heappush(only,(cd,ct))
        rd,rt = heapq.heappop(use)
        x += cd-rd
        l += 1
        neta[ct] += 1
        neta[rt] -= 1
        ans = max(ans,x+l**2)
        
    print(ans)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

def main():
    N, W = map(int, input().split())
    dp = np.zeros(W+1, dtype=np.int16)
    for _ in range(N):
        w, v = map(int, input().split())
        np.maximum(dp[:-w] + v, dp[w:], out=dp[w:])
    print(dp[-1])

if __name__ == "__main__":
    main()

Fixed submission:
import numpy as np

def main():
	N, W = map(int, input().split())
	dp = np.full(N * 1000 + 1, 10 ** 10, dtype=np.int64)
	dp[0] = 0
	for _ in range(N):
		w, v = map(int, input().split())
		np.minimum(dp[:-v] + w, dp[v:], out=dp[v:])
	print(((dp <= W) * np.arange(N * 1000 + 1)).max())

if __name__ == "__main__":
	main()

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

n, w = map(int, input().split())
wv = [list(map(int, input().split())) for i in range(n)]
table = np.zeros(w+1, dtype=np.int16)

for i in range(n):
    l = table[:-wv[i][0]]
    r = table[wv[i][0]:]
    np.maximum(l + wv[i][1], r, out = r)

print(table[w])

Fixed submission:
import numpy as np

def main():
	N, W = map(int, input().split())
	dp = np.full(N * 1000 + 1, 10 ** 10, dtype=np.int64)
	dp[0] = 0
	for _ in range(N):
		w, v = map(int, input().split())
		np.minimum(dp[:-v] + w, dp[v:], out=dp[v:])
	print(((dp <= W) * np.arange(N * 1000 + 1)).max())

if __name__ == "__main__":
	main()

Buggy python submission (verdict: Runtime Error):
import numpy as np

n, w = map(int, input().split())
wv = [list(map(int, input().split())) for i in range(n)]
table = np.zeros(w+1, dtype=np.int64)

for i in range(n):
    l = table[:-wv[i][0]]
    r = table[wv[i][0]:]
    np.maximum(l + wv[i][1], r, out = r)

print(table[w])

Fixed submission:
import numpy as np

def main():
	N, W = map(int, input().split())
	dp = np.full(N * 1000 + 1, 10 ** 10, dtype=np.int64)
	dp[0] = 0
	for _ in range(N):
		w, v = map(int, input().split())
		np.minimum(dp[:-v] + w, dp[v:], out=dp[v:])
	print(((dp <= W) * np.arange(N * 1000 + 1)).max())

if __name__ == "__main__":
	main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.buffer.readline

def main():
    N = int(input())
    a = list(map(int,input().split()))
    dp = [[-1 for _ in range(N)] for _ in range(N)]
    for i in range(N):
        dp[i][i] = a[i]
    
    for i in range(N-1,-1,-1):
        for j in range(i,N):
            if dp[i][j] != -1:
                continue
            dp[i][j] = max(a[i]-dp[i+1][j],a[j]-dp[i][j-1])
            
    print(dp[0][-1])
   
if __name__ == "__main__":
    main()


Fixed submission:
import sys
input = sys.stdin.buffer.readline

def main():
    N = int(input())
    a = list(map(int,input().split()))
    dp = [[-1 for _ in range(N)] for _ in range(N)]
    for i in range(N):
        dp[i][i] = a[i]
    
    for i in range(N-1,-1,-1):
        for j in range(i,N):
            if dp[i][j] != -1:
                continue
            dp[i][j] = max(a[i]-dp[i+1][j],a[j]-dp[i][j-1])
            
    print(dp[0][-1])
   
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 9)

def main():
    N = int(input())
    a = list(map(int,input().split()))
    memo = [[-1 for _ in range(N)] for _ in range(N)]
    for i in range(N):
        memo[i][i] = a[i]
    
    def point(x,y):
        if memo[x][y] != -1:
            return memo[x][y]
        else:
            ret = max(a[x]-point(x+1,y),a[y]-point(x,y-1))
            memo[x][y] = ret
            return ret
            
    point(0,N-1)
    print(memo[0][N-1])
   
if __name__ == "__main__":
    main()


Fixed submission:
import sys
input = sys.stdin.buffer.readline

def main():
    N = int(input())
    a = list(map(int,input().split()))
    dp = [[-1 for _ in range(N)] for _ in range(N)]
    for i in range(N):
        dp[i][i] = a[i]
    
    for i in range(N-1,-1,-1):
        for j in range(i,N):
            if dp[i][j] != -1:
                continue
            dp[i][j] = max(a[i]-dp[i+1][j],a[j]-dp[i][j-1])
            
    print(dp[0][-1])
   
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    A = list(map(int,input().split()))
    A.sort(reverse = True)
    M = max(A)
    ex = [0 for _ in range(M+1)]
    for i in range(N):
        ex[A[i]] += 1
        
    
    def exp(x):
        l = len(str(bin(x))[2:])
        return 2**l

    ans = 0
    for i in range(N):
        use = A[i]
        if ex[use] == 0:
            continue
        ex[use] -= 1
        pare = exp(use)-use
        if ex[pare] != 0:
            ex[pare] -= 1
            ans += 1
    
    print(ans)
    
if __name__ == "__main__":
    main()


Fixed submission:
from collections import defaultdict
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    A = list(map(int,input().split()))
    d = defaultdict(int)
    for x in A:
        d[x] += 1
    A = list(set(A))
    A.sort(reverse = True)
    l = len(A)
    
    def exp(x):
        l = len(str(bin(x))[2:])
        return 2**l

    ans = 0
    for i in range(l):
        a = A[i]
        if exp(a)//2 == a:
            ans += int(d[a]//2)
        else:
            m = min(d[a],d[exp(a)-a])
            ans += m
            d[a] -= m
            d[exp(a)-a] -= m
            
    print(ans)
    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    A = list(map(int,input().split()))
    A.sort(reverse = True)
    M = max(A)
    ex = [0 for _ in range(M+1)]
    for i in range(N):
        ex[A[i]] += 1
        
    
    def exp(x):
        ans = 1
        while x >= ans:
            ans *= 2
        return ans

    ans = 0
    for i in range(N):
        use = A[i]
        if ex[use] == 0:
            continue
        ex[use] -= 1
        pare = exp(use)-use
        if ex[pare] != 0:
            ex[pare] -= 1
            ans += 1
    
    print(ans)
    
if __name__ == "__main__":
    main()


Fixed submission:
from collections import defaultdict
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    A = list(map(int,input().split()))
    d = defaultdict(int)
    for x in A:
        d[x] += 1
    A = list(set(A))
    A.sort(reverse = True)
    l = len(A)
    
    def exp(x):
        l = len(str(bin(x))[2:])
        return 2**l

    ans = 0
    for i in range(l):
        a = A[i]
        if exp(a)//2 == a:
            ans += int(d[a]//2)
        else:
            m = min(d[a],d[exp(a)-a])
            ans += m
            d[a] -= m
            d[exp(a)-a] -= m
            
    print(ans)
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    def prime_list(n):
        prime = [True for _ in range(n+1)]
        prime[0] = False
        prime[1] = False
        for i in range(2,int(n**0.5)+1):
            if not prime[i]:
                continue
            for j in range(i*2,n+1,i):
                prime[j] = False
        return [i for i in range(n+1) if prime[i]]

    prime_list = prime_list(N//2)
    cnt_list = [0 for _ in range(len(prime_list))]
    for i in range(len(prime_list)):
        count = 0
        d = N
        while d >= 1:
            count += d//(prime_list[i])
            d //= prime_list[i]
        cnt_list[i] = count

    def num(X):
        return len(list(filter(lambda x:x>=X-1,cnt_list)))

    print(num(75)+num(15)*(num(5)-1)+num(25)*(num(3)-1)+\
        num(5)*(num(5)-1)*(num(3)-2)//2)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    N = int(input())

    if N == 1:
        print(0)
    else:
        def prime_list(n):
            prime = [True for _ in range(n+1)]
            prime[0] = False
            prime[1] = False
            for i in range(2,int(n**0.5)+1):
                if not prime[i]:
                    continue
                for j in range(i*2,n+1,i):
                    prime[j] = False
            return [i for i in range(n+1) if prime[i]]

        prime_list = prime_list(N//2)
        cnt_list = [0 for _ in range(len(prime_list))]
        for i in range(len(prime_list)):
            count = 0
            d = N
            while d >= 1:
                count += d//(prime_list[i])
                d //= prime_list[i]
            cnt_list[i] = count

        def num(X):
            return len(list(filter(lambda x:x>=X-1,cnt_list)))

        print(num(75)+num(15)*(num(5)-1)+num(25)*(num(3)-1)+\
            num(5)*(num(5)-1)*(num(3)-2)//2)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
N = int(input())

if N = 1:
  print("Hello World")
else:
  A = int(input())
  
  B = int(input())
  
  print( A + B )


Fixed submission:
N = int(input())
 
if N == 1:
  print("Hello World")
else:
  A = int(input())
  
  B = int(input())
  
  print( A + B )