Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

count = 0
while True:
    if A[0]-B[0] >= 0:
        K -= B[0]
        if K >= 0:
            count += 1
            B.pop(0)
        else:
            break
    else:
        K -= A[0]
        if K >= 0 :
            count += 1
            A.pop(0)
        else:
            break        
print(count)
    

Fixed submission:

import numpy as np
a,b,k=map(int,input().split())
n=list(map(int,input().split()))
m=list(map(int,input().split()))
n.insert(0,0)
m.insert(0,0)
n=np.array(n)
m=np.array(m)
n=n.cumsum()
m=m.cumsum()
ans=0
j=len(m)-1
for i in range(len(n)):
    if n[i]>k:
        break
    while m[j]>k-n[i]:
        j-=1
    ans=max(ans,i+j)
print(ans)

Buggy python submission (verdict: Runtime Error):

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

count = 0
while True:
    if A[0]-B[0] >= 0:
        K = K-B[0]
        if K >= 0 :
            count += 1
            B.pop(0)
        else:
            break

    else:
        K = K-A[0]
        if K >= 0 :
            count += 1
            A.pop(0)
        else:
            break        
print(count)

Fixed submission:

import numpy as np
a,b,k=map(int,input().split())
n=list(map(int,input().split()))
m=list(map(int,input().split()))
n.insert(0,0)
m.insert(0,0)
n=np.array(n)
m=np.array(m)
n=n.cumsum()
m=m.cumsum()
ans=0
j=len(m)-1
for i in range(len(n)):
    if n[i]>k:
        break
    while m[j]>k-n[i]:
        j-=1
    ans=max(ans,i+j)
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]
x=0
for i in a:
    x^=i

b=[x^i for i in a]
for i in b:
    print(i,end=" ")

Fixed submission:
a = str(input())

if a.isupper():
    print('A')
else:
    print('a')
Buggy python submission (verdict: Runtime Error):
X, N = map(int, input().split())
p = list(map(int, input().split()))

for d in range(X + 1):
    if (X - d) not in p:
        print(X-d)
        exit()
    elif (X + d) not in p:
        print(X+d)
        exit()

Fixed submission:
import numpy as np
x = list(map(int, input().split()))

sub=[]
for i in range(len(x)):
    if x[i]== 0:
        sub.append(i+1)
print(*sub)

Buggy python submission (verdict: Runtime Error):
X, N = map(int, input().split())
p = list(map(int, input().split()))

for d in range(X + 1):
    if X - d not in p:
        print(X-d)
        exit()
    elif X + d not in p:
        print(X+d)
        exit()


Fixed submission:
import numpy as np
x = list(map(int, input().split()))

sub=[]
for i in range(len(x)):
    if x[i]== 0:
        sub.append(i+1)
print(*sub)
Buggy python submission (verdict: Runtime Error):
def main():
  n=int(input())
  a=sorted(map(int,input().split()))
  maxa=a[-1]+1
  tf=[False]*maxa
  r=0
  n-=1
  for i in range(n):
    a_i=a[i]
    if tf[a_i] ==False:
      for j in range(a_i,maxa,a_i):
        tf[j]=True
      if a_i  <a[i+1]:
        #print(a_i)
        r+=1
  if tf[-1] ==False:
    #r+=1
  print(r)
main()


Fixed submission:
def main():
  n=int(input())
  a=sorted(map(int,input().split()))
  maxa=a[-1]+1
  tf=[False]*maxa
  r=0
  n-=1
  for i in range(n):
    a_i=a[i]
    if tf[a_i] ==False:
      for j in range(a_i,maxa,a_i):
        tf[j]=True
      if a_i  <a[i+1]:
        #print(a_i)
        r+=1
  if tf[-1] ==False:
    r+=1
  print(r)
main()
Buggy python submission (verdict: Runtime Error):
A=input('A')
V=input('V')
B=input('B')
W=input('W')
T=input('T')

A = int(A)
V = int(V)
B = int(B)
W = int(W)
T = int(T)

if (V-W)*T >= A-B:
	print('Yes')
else
	print('No')

Fixed submission:
A,V = list(map(int, input().split()))
B,W = list(map(int, input().split()))
T = int(input())
print("YES" if (V-W) * T >= abs(B-A) else "NO")

Buggy python submission (verdict: Runtime Error):
A=int(input('A'))
B=int(input('B'))
V=int(input('V'))
W=int(input('W'))
T=int(input('T'))

if (V-W)*T >= A-B:
	print('Yes')
else
	print('No')

Fixed submission:
A,V = list(map(int, input().split()))
B,W = list(map(int, input().split()))
T = int(input())
print("YES" if (V-W) * T >= abs(B-A) else "NO")

Buggy python submission (verdict: Runtime Error):
if (V-W)*T >= A-B:
	print('Yes')
else
	print('No')

Fixed submission:
A,V = list(map(int, input().split()))
B,W = list(map(int, input().split()))
T = int(input())
print("YES" if (V-W) * T >= abs(B-A) else "NO")
Buggy python submission (verdict: Runtime Error):
x, n = map(int, input().split())
p = list(map(int, input().split()))
mem = []
mind = 100
for i in range(1, 100+1):
    if i not in p:
        t = abs(x-i)
        if t < mind:
            mem.append([i, t])
            mind = t
mem = sorted(mem, key=lambda x: (x[1], x[0]))
print(mem[0][0])


Fixed submission:
x, n = map(int, input().split())
p = list(map(int, input().split()))
mem = []
mind = 100
for i in range(-100, 200):
    if i not in p:
        t = abs(x-i)
        if t < mind:
            mem.append([i, t])
            mind = t
mem = sorted(mem, key=lambda x: (x[1], x[0]))
print(mem[0][0])
Buggy python submission (verdict: Time Limit Exceeded):
import sys
from collections import deque


def input():
    return sys.stdin.readline()[:-1]


def main():
    S = input()
    Q = int(input())
    que = deque(S)
    for i in range(Q):
        q = list(input().split())
        if len(q) == 1:
            que.reverse()
        else:
            _, f, c = q
            if f == '1':
                que.appendleft(c)
            else:
                que.append(c)
    print("".join(list(que)))


if __name__ == "__main__":
    main()


Fixed submission:
import sys
from collections import deque


def input():
    return sys.stdin.readline()[:-1]


def main():
    S = input()
    Q = int(input())
    que = deque(S)
    rev = 0
    for i in range(Q):
        q = input()
        if q[0] == '1':
            # que.reverse()
            rev += 1
        else:
            _, f, c = q.split()
            if rev % 2 == 0:
                if f == '1':
                    que.appendleft(c)
                else:
                    que.append(c)
            else:
                if f == '1':
                    que.append(c)
                else:
                    que.appendleft(c)
    if rev % 2 == 1:
        que.reverse()
    print("".join(list(que)))


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

import numpy as np

def main():
    N,K = map(int, input().split())
    A = list(map(int, input().split()))
    A = np.array(A)
    A.sort()
    zero = np.count_nonzero(A==0)
    positive = A[A>0]
    negative = A[A<0]
    def count(x): # 積がx以下になるペアの個数を返す
        ans = 0
        if x >= 0:
            ans += N*zero
        ans += np.searchsorted(A, x//positive, side="right").sum()
        ans += N*len(negative) - np.searchsorted(A, -(-x//negative), side="left").sum()
        ans -= np.count_nonzero(A*A <= x) # 同じものはふたつ選べない
        return ans//2
    ok = 10**8
    ng = -ok-1
    while ok-ng>1:
        cur = (ok+ng)//2
        if count(cur)>=K:
            ok = cur
        else:
            ng = cur
    print(int(ok))


    
if __name__ == "__main__":
    main()

Fixed submission:

import numpy as np

def main():
    N,K = map(int, input().split())
    A = list(map(int, input().split()))
    A = np.array(A)
    A.sort()
    zero = np.count_nonzero(A==0)
    positive = A[A>0]
    negative = A[A<0]
    def count(x): # 積がx以下になるペアの個数を返す
        ans = 0
        if x >= 0:
            ans += N*zero
        ans += np.searchsorted(A, x//positive, side="right").sum()
        ans += N*len(negative) - np.searchsorted(A, -(-x//negative), side="left").sum()
        ans -= np.count_nonzero(A*A <= x) # 同じものはふたつ選べない
        return ans//2
    ok = 10**18
    ng = -ok-1
    while ok-ng>1:
        cur = (ok+ng)//2
        if count(cur)>=K:
            ok = cur
        else:
            ng = cur
    print(int(ok))


    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations
from bisect import bisect_left
import sys
sys.setrecursionlimit(10 ** 6)
 

def main():
    N,K = map(int, input().split())
    A = list(map(int, input().split()))
    r = []
    for com in list(combinations(A,2)):
        r.append(com[0]*com[1])
    r.sort()
    print(r[K-1])
    
if __name__ == "__main__":
    main()

Fixed submission:

import numpy as np

def main():
    N,K = map(int, input().split())
    A = list(map(int, input().split()))
    A = np.array(A)
    A.sort()
    zero = np.count_nonzero(A==0)
    positive = A[A>0]
    negative = A[A<0]
    def count(x): # 積がx以下になるペアの個数を返す
        ans = 0
        if x >= 0:
            ans += N*zero
        ans += np.searchsorted(A, x//positive, side="right").sum()
        ans += N*len(negative) - np.searchsorted(A, -(-x//negative), side="left").sum()
        ans -= np.count_nonzero(A*A <= x) # 同じものはふたつ選べない
        return ans//2
    ok = 10**18
    ng = -ok-1
    while ok-ng>1:
        cur = (ok+ng)//2
        if count(cur)>=K:
            ok = cur
        else:
            ng = cur
    print(int(ok))


    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input():
    return sys.stdin.readline()[:-1]
def main():
    # dp:=上からi桁目まで払える最小の枚数
    S = list(map(int, '0'+input()))
    l = len(S)
    dp = [[1e18]*2 for _ in range(1001001)]
    dp[0][0]=0
    for i in range(l):
        k = S[i]
        dp[i+1][0] = min(dp[i+1][0], dp[i][0]+k)
        dp[i+1][1] = min(dp[i+1][1], dp[i][0]+k+1)
        dp[i+1][0] = min(dp[i+1][0], dp[i][1]+10-k)
        dp[i+1][1] = min(dp[i+1][1], dp[i][1]+10-k-1)
    print(dp[l][0])

    
if __name__ == "__main__":
    main()

Fixed submission:
import sys
def input():
    return sys.stdin.readline()[:-1]
def main():
    # dp:=上からi桁目まで払える最小の枚数
    S = list(map(int, '0'+input()))
    l = len(S)
    dp = [[1e18]*2 for _ in range(1001001)]
    dp[0][0]=0
    for i in range(l):
        k = S[i]
        dp[i+1][0] = min(dp[i+1][0], dp[i][0]+k)
        dp[i+1][1] = min(dp[i+1][1], dp[i][0]+k+1)
        dp[i+1][0] = min(dp[i+1][0], dp[i][1]+10-k)
        dp[i+1][1] = min(dp[i+1][1], dp[i][1]+10-k-1)
    print(dp[l][0])

    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
from itertools import combinations
from bisect import bisect_left
import sys
sys.setrecursionlimit(10 ** 6)
 

def main():
    # dp:=上からi桁目まで払える最小の枚数
    S = list(map(int, input()))
    l = len(S)
    dp = [[1e18]*2 for _ in range(10**6)]
    dp[0][0]=0
    for i in range(l):
        k = int(S[i])
        dp[i+1][0] = min(dp[i+1][0], dp[i][0]+k)
        dp[i+1][1] = min(dp[i+1][1], dp[i][0]+k+1)
        dp[i+1][0] = min(dp[i+1][0], dp[i][1]+10-k)
        dp[i+1][1] = min(dp[i+1][1], dp[i][1]+10-k-1)
    print(dp[l][0])

    
if __name__ == "__main__":
    main()

Fixed submission:
import sys
def input():
    return sys.stdin.readline()[:-1]
def main():
    # dp:=上からi桁目まで払える最小の枚数
    S = list(map(int, '0'+input()))
    l = len(S)
    dp = [[1e18]*2 for _ in range(1001001)]
    dp[0][0]=0
    for i in range(l):
        k = S[i]
        dp[i+1][0] = min(dp[i+1][0], dp[i][0]+k)
        dp[i+1][1] = min(dp[i+1][1], dp[i][0]+k+1)
        dp[i+1][0] = min(dp[i+1][0], dp[i][1]+10-k)
        dp[i+1][1] = min(dp[i+1][1], dp[i][1]+10-k-1)
    print(dp[l][0])

    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**6)


def main():
    def dfs(now, prev=-1):
        for next in edge[now]:
            if next == prev:
                continue
            score[next] += score[now]
            dfs(next, now)

    N, Q = map(int, input().split())
    edge = [[] for _ in range(N+1)]
    for _ in range(N-1):
        u, v = map(int, input().split())
        edge[u].append(v)
        edge[v].append(u)
    p = []
    x = []
    score = [0] * (N+1)
    for _ in range(Q):
        p, x = map(int, input().split())
        score[p] += x
    dfs(1)
    print(*score[1:])


if __name__ == "__main__":
    main()


Fixed submission:
import sys
sys.setrecursionlimit(10 ** 6)


def input():
    return sys.stdin.readline()[:-1]


def main():
    def dfs(now, prev=-1):
        for next in edge[now]:
            if next == prev:
                continue
            score[next] += score[now]
            dfs(next, now)

    N, Q = map(int, input().split())
    edge = [[] for _ in range(N+1)]
    for _ in range(N-1):
        u, v = map(int, input().split())
        edge[u].append(v)
        edge[v].append(u)
    p = []
    x = []
    score = [0] * (N+1)
    for _ in range(Q):
        p, x = map(int, input().split())
        score[p] += x
    dfs(1)
    print(*score[1:])


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10 ** 6)


def input():
    return sys.stdin.readline()[:-1]


def main():
    N = int(input())
    a = [-1]+list(map(int, input().split()))
    b = [0] * (N+1)
    for i in reversed(range(1,N+1)):
        total = 0
        for j in range(i,N+1):
            if i%j==0:
                total += b[j]
        if a[i] != (total%2):
            b[i] = 1
    ans = []
    cnt = 0
    for i, n in enumerate(b):
        if n!=0:
            ans.append(i)
            cnt += 1
    print(cnt)
    print(*ans)

if __name__ == "__main__":
    main()


Fixed submission:
import sys
sys.setrecursionlimit(10 ** 6)


def input():
    return sys.stdin.readline()[:-1]


def main():
    N = int(input())
    a = [-1]+list(map(int, input().split()))
    b = [0] * (N+1)
    for i in reversed(range(1,N+1)):
        total = 0
        for j in range(i,N+1,i):
            total += b[j]
        if a[i] != (total%2):
            b[i] = 1
    ans = []
    cnt = 0
    for i, n in enumerate(b):
        if n!=0:
            ans.append(i)
            cnt += 1
    print(cnt)
    print(*ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10 ** 6)


def input():
    return sys.stdin.readline()[:-1]


def main():
    N = int(input())
    a = [-1]+list(map(int, input().split()))
    b = [0] * (N+1)
    for i in reversed(range(1,N+1)):
        total = 0
        for j in range(i,N+1):
            if i%j==0:
                total += b[j]
        if a[i] != (total%2):
            b[i] = 1
    ans = []
    cnt = 0
    for i, n in enumerate(b):
        if n!=0:
            ans.append(i)
            cnt += 1
    print(cnt)
    print(*ans)

if __name__ == "__main__":
    main()


Fixed submission:
import sys
sys.setrecursionlimit(10 ** 6)


def input():
    return sys.stdin.readline()[:-1]


def main():
    N = int(input())
    a = [-1]+list(map(int, input().split()))
    b = [0] * (N+1)
    for i in reversed(range(1,N+1)):
        total = 0
        for j in range(i,N+1,i):
            total += b[j]
        if a[i] != (total%2):
            b[i] = 1
    ans = []
    cnt = 0
    for i, n in enumerate(b):
        if n!=0:
            ans.append(i)
            cnt += 1
    print(cnt)
    print(*ans)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10 ** 6)

MOD = 10**9 + 7


def input():
    return sys.stdin.readline()[:-1]

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  # 10
    """

    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * \
                modinv[self.mod % i] % self.mod
        return modinv


def main():
    N,K = map(int, input().split())
    comb = Combination()
    for i in range(1, K+1):
        print(comb(N-K+1, i)*comb(K-1, i-1)%MOD)


if __name__ == "__main__":
    main()


Fixed submission:
import sys
sys.setrecursionlimit(10 ** 6)


def input():
    return sys.stdin.readline()[:-1]


def main():
    N,K = map(int, input().split())
    mod = 10**9+7
    fac = [1]*(N+1)
    rev = [1]*(N+1)
    
    for i in range(1,N+1):
        fac[i] = i*fac[i-1]%mod
        rev[i] = pow(fac[i], mod-2, mod)
    
    comb = lambda a,b:(fac[a]*rev[a-b]*rev[b])%mod
    for i in range(1, K+1):
        if i >N-K+1:
            print(0)
            continue
        print(comb(N-K+1, i)*comb(K-1, i-1)%mod)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline


def main():
    AB = []
    n = int(input())
    for i in range(n):
        a, b = map(int, input().split())
        AB.append([a, b])
    AB = sorted(AB, key=lambda x: (x[1], -x[0]))
    time = 0
    for span, dead in zip(AB):
        time += span
        if time > dead:
            print('No')
            return
    print('Yes')
    return


if __name__ == "__main__":
    main()


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


def main():
    AB = []
    n = int(input())
    for i in range(n):
        a, b = map(int, input().split())
        AB.append([a, b])
    AB = sorted(AB, key=lambda x: (x[1], -x[0]))
    time = 0
    for span, dead in AB:
        time += span
        if time > dead:
            print('No')
            return
    print('Yes')
    return


if __name__ == "__main__":
    main()

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


def main():
    AB = []
    n = int(input())
    for i in range(n):
        a, b = map(int, input().split())
        AB.append([a, b])
    AB = sorted(AB, key=lambda x: (x[1], -x[0]))
    time = 0
    while AB:
        span, dead = AB.pop(0)
        time += span
        if time > dead:
            print('No')
            return
    print('Yes')
    return


if __name__ == "__main__":
    main()


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


def main():
    AB = []
    n = int(input())
    for i in range(n):
        a, b = map(int, input().split())
        AB.append([a, b])
    AB = sorted(AB, key=lambda x: (x[1], -x[0]))
    time = 0
    for span, dead in AB:
        time += span
        if time > dead:
            print('No')
            return
    print('Yes')
    return


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
# # ABC126D.py, ATC001A.py などを参照

N = int(input())
edge = [[] for _ in range(N)]
for _ in range(N-1):
    u, v, w = map(int, input().split())
    edge[u-1].append([v-1, w])
    edge[v - 1].append([u - 1, w])


# 各頂点までの距離をdfsで求める
depth = [-1] * N
depth[0] = 0


def dfs(edge, s):
    for v in edge[s]:
        if depth[v[0]] == -1:  # 未訪問なら更新する
            depth[v[0]] = depth[s] + v[1]
            dfs(edge, v[0])


dfs(edge, 0)
for d in depth:
    if d % 2 == 0:
        print(0)
    else:
        print(1)


Fixed submission:
# # ABC126D.py, ATC001A.py などを参照
import sys
sys.setrecursionlimit(1000000)
N = int(input())
edge = [[] for _ in range(N)]
for _ in range(N-1):
    u, v, w = map(int, input().split())
    edge[u-1].append([v-1, w])
    edge[v-1].append([u-1, w])


# 各頂点までの距離をdfsで求める
depth = [-1] * N
depth[0] = 0


def dfs(edge, s):
    for v in edge[s]:
        if depth[v[0]] == -1:  # 未訪問なら更新する
            depth[v[0]] = depth[s] + v[1]
            dfs(edge, v[0])


dfs(edge, 0)
for d in depth:
    if d % 2 == 0:
        print(0)
    else:
        print(1)
Buggy python submission (verdict: Runtime Error):
import sys
n, m = map(int, input().split())
r = [-1] * n

for _ in range(m):
    s, c = map(int, input().split())
    if r[s-1] == -1 or r[s-1] == c:
        r[s-1] = c
    else:
        print(-1)
        sys.exit(0)

if r[0] == 0:
    print(-1)
    sys.exit(0)
if r[0] == -1 and n > 1:
    r[0] = 1

n_r = [0 if i == -1 else i for i in r]
result = ''.join([str(i) for i in n_r])
print(result)

Fixed submission:
n = int(input())
print(n // 2 + n % 2)
Buggy python submission (verdict: Runtime Error):
s = input()
for i, c in enumerate(s):
  s[i] = 'x'
print(s)

Fixed submission:
s = len(input())
print('x' * s)

Buggy python submission (verdict: Runtime Error):
s = input()
for c, i in enumerate(s):
  s[i] = 'x'
print(s)

Fixed submission:
s = len(input())
print('x' * s)
Buggy python submission (verdict: Runtime Error):
n = int(input())
count = 0
for i in range(1, n+1 / 2):
  for j in range(1, n+1 / 2):
    if str(i)[0] == str(j)[-1]:
      if str(j)[0] == str(i)[-1]:
        count += 1
        
print(count * 2)

Fixed submission:
n, m = map(int, input().split())

print('Yes') if n == m else print('No')
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

for i in range(k):
    if a > 0:
        a = a - 1
    elif b > 0:
        b = b - 1

print(a, b)

Fixed submission:
s, t = input().split()
print(t+s)
Buggy python submission (verdict: Runtime Error):
n = input()
if(n == 1):
  print "Hello World"
else:
  a, b = map(int, raw_input().split())
  print a + b

Fixed submission:
n = input()
if(n == 1):
  print "Hello World"
else:
  a = input()
  b = input()
  print a + b
Buggy python submission (verdict: Runtime Error):
a + a ** 2 + a ** 10

Fixed submission:
a = int(input())
b = a + a ** 2 + a ** 3
print (b)

Buggy python submission (verdict: Runtime Error):
a = int(intput())
ans = a*(1+a*(1+a))
print(ans)
       

Fixed submission:
a = int(input())
ans = a*(1+a*(1+a))
print(ans)

Buggy python submission (verdict: Runtime Error):
a = input()
ans = a + a ^ 2 + a ^ 3
print ans


Fixed submission:
a = int(input())
ans = a + a**2 + a**3
print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()

S = list(S)
T = list(T)

i = 0
j = 0

while j < len(S):
  if S[j] = T[j]:
    i = i
    j += 1
  else:
    i += 1
    j += 1
    
print(i)

Fixed submission:
S = input()
T = input()

S = list(S)
T = list(T)

i = 0
j = 0

while j < len(S):
    if S[j] == T[j]:
        i = i
        j += 1
    else:
        i += 1
        j += 1

print(i)