Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def eratosthenes(n):
    A = [i for i in range(2, n+1)]
    P = []
    i = 2
    while i**2 <= n:
        prime = min(A)
        P.append(prime)
        j = 0
        while j < len(A):
            if A[j] % prime == 0:
                A.pop(j)
                continue
            j += 1
        i += 1    
    for a in A:
        P.append(a)
    return P
    
x = int(input())
prime_table = eratosthenes(100003)
prime_set = set(prime_table)
if x in prime_set:
    print(x)
else:
    idx = bisect_right(prime_table, x)
    ans = prime_table[idx]
    print(ans)


Fixed submission:
from bisect import bisect_left

def main():
    def eratosthenes(n):
        A = [i for i in range(2, n+1)]
        P = []
        i = 2
        while i**2 <= n:
            prime = min(A)
            P.append(prime)
            j = 0
            while j < len(A):
                if A[j] % prime == 0:
                    A.pop(j)
                    continue
                j += 1
            i += 1    
        for a in A:
            P.append(a)
        return P

    x = int(input())
    prime_table = eratosthenes(100003)
    idx = bisect_left(prime_table, x)
    ans = prime_table[idx]
    print(ans)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
from bisect import bisect_right

def eratosthenes(n):
    A = [i for i in range(2, n+1)]
    P = []
    i = 2
    while i**2 <= n:
        prime = min(A)
        P.append(prime)
        j = 0
        while j < len(A):
            if A[j] % prime == 0:
                A.pop(j)
                continue
            j += 1
        i += 1    
    for a in A:
        P.append(a)
    return P
    
x = int(input())
prime_table = eratosthenes(100003)
prime_set = set(prime_table)
if x in prime_set:
    print(x)
else:
    idx = bisect_left(prime_table, x)
    ans = prime_table[idx]
    print(ans)

Fixed submission:
from bisect import bisect_left

def main():
    def eratosthenes(n):
        A = [i for i in range(2, n+1)]
        P = []
        i = 2
        while i**2 <= n:
            prime = min(A)
            P.append(prime)
            j = 0
            while j < len(A):
                if A[j] % prime == 0:
                    A.pop(j)
                    continue
                j += 1
            i += 1    
        for a in A:
            P.append(a)
        return P

    x = int(input())
    prime_table = eratosthenes(100003)
    idx = bisect_left(prime_table, x)
    ans = prime_table[idx]
    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    a_s = sorted(set(a), key=a.index)
    cnt = 0
    order = 1
    if not 1 in a_s:
        print(-1)
        exit()
    else:
        for i in range(len(a)):
            if a[i] != order:
                cnt += 1
            if a[i] == order:
                order += 1
    print(cnt)

if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    a_s = set(a)
    cnt = 0
    order = 1
    if not 1 in a_s:
        print(-1)
        exit()
    else:
        for i in range(len(a)):
            if a[i] != order:
                cnt += 1
            if a[i] == order:
                order += 1
    print(cnt)

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

n = int(input())
A = [int(x) for x in input().split()]
ans = 0
mod = 10 ** 9 + 7
# 制約がai <= 2^60なので
for d in range(61):
    # d桁目ごとに考える
    x = 0
    for a in A:
        if (a >> d) & 1:
            x += 1
    ans += x * (n-x) * 2**d
    ans %= mod
print(ans)

Fixed submission:
def main():
    n = int(input())
    A = [int(x) for x in input().split()]
    ans = 0
    mod = 10 ** 9 + 7
    for d in range(61):
        # d桁目ごとに考える
        x = 0
        for a in A:
            if (a >> d) & 1:
                x += 1
        ans += x * (n-x) * 2**d
        ans %= mod
    print(ans)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = [int(x) for x in input().split()]
ans = 0
mod = 10 ** 9 + 7
for d in range(60):
    # d桁目ごとに考える
    x = 0
    for a in A:
        if (a >> d) & 1:
            x += 1
    ans += x * (n-x) * 2**d
    ans %= mod
print(ans)

Fixed submission:
def main():
    n = int(input())
    A = [int(x) for x in input().split()]
    ans = 0
    mod = 10 ** 9 + 7
    for d in range(61):
        # d桁目ごとに考える
        x = 0
        for a in A:
            if (a >> d) & 1:
                x += 1
        ans += x * (n-x) * 2**d
        ans %= mod
    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
from heapq import heapify, heappush, heappop
input = sys.stdin.readline

def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    h = a.copy()
    heapify(h)
    for _ in range(n):
        h_a = heappop(h)
        print(a.index(h_a)+1, end=' ')

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    ans = [None] * n
    for idx, ea in enumerate(a):
        ans[ea-1] = idx+1
    print(*ans)
    
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from heapq import heapify, heappush, heappop

def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    h = a.copy()
    heapify(h)
    for _ in range(n):
        h_a = heappop(h)
        print(a.index(h_a)+1, end=' ')

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    ans = [None] * n
    for idx, ea in enumerate(a):
        ans[ea-1] = idx+1
    print(*ans)
    
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    a_s = sorted(a)
    #ans = []
    for i in a_s:
        #ans.append(a.index(i)+1)
        print(a.index(i)+1, end=' ')
    #print(*ans)

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    ans = [None] * n
    for idx, ea in enumerate(a):
        ans[ea-1] = idx+1
    print(*ans)
    
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    a_s = sorted(a)
    ans = []
    for i in a_s:
        ans.append(a.index(i)+1)
    print(*ans)

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    ans = [None] * n
    for idx, ea in enumerate(a):
        ans[ea-1] = idx+1
    print(*ans)
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    n, m = map(int, input().split())
    a = [int(x)*-1 for x in input().split()]
    ans = sum(a)*-1
    diff = 0
    
    heapify(a)
    for _ in range(1, m+1):
        _h_a = heappop(a) * -1
        diff += _h_a - _h_a // 2
        heappush(a, (_h_a // 2)*-1)
    ans -= diff
    print(ans)
    
if __name__ == '__main__':
    main()

Fixed submission:
from heapq import heapify, heappush, heappop

def main():
    n, m = map(int, input().split())
    a = [int(x)*-1 for x in input().split()]
    ans = sum(a)*-1
    diff = 0
    
    heapify(a)
    for _ in range(1, m+1):
        _h_a = heappop(a) * -1
        diff += _h_a - _h_a // 2
        heappush(a, (_h_a // 2)*-1)
    ans -= diff
    print(ans)
    
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n, m = map(int, input().split())
    a = [int(x) for x in input().split()]
    a.sort(reverse=True)
    ans = sum(a)
    diff = 0
    for i in range(1, m+1):
        a_i = a[:i]
        a_m = max(a_i)
        diff += a_m  - a_m // 2
        a_m_i = a_i.index(a_m)
        a[a_m_i] = a[a_m_i] // 2
    ans -= diff
    print(ans)
    
if __name__ == '__main__':
    main()

Fixed submission:
from heapq import heapify, heappush, heappop

def main():
    n, m = map(int, input().split())
    a = [int(x)*-1 for x in input().split()]
    ans = sum(a)*-1
    diff = 0
    
    heapify(a)
    for _ in range(1, m+1):
        _h_a = heappop(a) * -1
        diff += _h_a - _h_a // 2
        heappush(a, (_h_a // 2)*-1)
    ans -= diff
    print(ans)
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import heapq

def main():
    n, m = map(int, input().split())
    a = [list(map(int, input().split())) for i in range(n)]
    a_t = list(zip(*a))
    a_s = set(a_t[0])
    cnt = 0
    h = [(l[1]*-1) for l in a if l[0] == 1]
    heapq.heapify(h)
    if 1 in a_s:
        cnt += heapq.heappop(h)
    for i in range(2, m+1):
        if i in a_s:
            p = [(l[1]*-1) for l in a if l[0] == i]
            for j in p:
                heapq.heappush(h, j)
        if h !=[]:
            cnt += heapq.heappop(h)
    print(-1*cnt)   
    
if __name__ == '__main__':
    main()

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import heapq

def main():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for i in range(n)]
    a_t = list(zip(*ab))
    AB = [[] for _ in range(m+1)]
    for a, b in zip(*a_t):
        if a <= m:
            AB[a].append(b*-1)
    # print(AB)
    cnt = 0
    h = [] 
    heapq.heapify(h)
    for i in AB:
        for j in i:
            heapq.heappush(h, j)
            # print('h', h)
        if h:
            cnt += heapq.heappop(h)
    print(-1*cnt)   

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    n = int(input())
    h = list(map(int, input().split()))

    pre = 0
    flag = True
    for i in range(n):
        if h[i] - 1 >= pre:
            h[i] -= -1
        if h[i] < pre:
            flag = False
            break
        pre = h[i]
    
    if flag:
        print('Yes')
    else:
        print('No')
                

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    a, b, c = map(int, input().split())
    ans = c - (a - b)
    if ans > 0:
        print(ans)
    else:
        print(0)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    a = [int(input()) for i in range(n)]
    for i in range(n):
        d = sorted(a, reverse=True)
        if d[0] == a[i]:
            print(d[1])
        else:
            print(d[0])
            
if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n = int(input())
    a = [int(input()) for i in range(n)]
    d = sorted(a, reverse=True)
    for i in range(n):    
        if d[0] == a[i]:
            print(d[1])
        else:
            print(d[0])

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
from operator import mul
from functools import reduce

def main():

    def cmb(n,r):
        r = min(n-r,r)
        if r == 0: return 1
        over = reduce(mul, range(n, n - r, -1))
        under = reduce(mul, range(1,r + 1))
        return over // under

    n, k = map(int, input().split())
    mod = 10**9+7
    
    # 青をi個に分割する組みわせ
    # i個に分割するにはi-1個区切りが必要
    # 区切りを入れられる場所はk-1
    # k-1Ci-1 
    for i in range(1, k+1):
        #cmb(k-1, i-1))
    # 赤の分割
    # 分け方として0を許すように考えて
    # n-k個 + 端2つをi+1に分割する（n-k+1の選べる場所からi個区切りを選ぶ（青がi個だから））
        #cmb(n-k+2, i)
        print(cmb(k-1, i-1) * cmb(n-k+1, i) % mod)

if __name__ == '__main__':
    main()

Fixed submission:
from operator import mul
from functools import reduce

def main():

    def cmb(n,r):
        r = min(n-r,r)
        if r == 0: return 1
        over = reduce(mul, range(n, n - r, -1))
        under = reduce(mul, range(1,r + 1))
        return over // under

    n, k = map(int, input().split())
    mod = 10**9+7

    # 青をi個に分割する組みわせ
    # i個に分割するにはi-1個区切りが必要
    # 区切りを入れられる場所はk-1
    # k-1Ci-1 
    for i in range(1, k+1):
        #cmb(k-1, i-1))
    # 赤の分割
    # 分け方として0を許すように考えて
    # n-k個 + 端2つをi+1に分割する（n-k+1の選べる場所からi個区切りを選ぶ（青がi個だから））
        #cmb(n-k+2, i)
        if n-k+1 >= i:
            print(cmb(k-1, i-1) * cmb(n-k+1, i) % mod)
        else:
            print(0)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    n = int(input())
    ll = list()
    for i in range(n):
        tmp = list(map(str, input().split()))
        tmp[1] = int(tmp[1])
        tmp.append(i+1)
        ll.append(tmp)
    print(ll)
    
    ll_s = sorted(ll, key=lambda x:(x[0],-x[1]))
    print(ll_s)
    for i in ll_s:
        print(i[2][0])
        
if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n = int(input())
    ll = list()
    for i in range(n):
        tmp = list(map(str, input().split()))
        tmp[1] = int(tmp[1])
        tmp.append(i+1)
        ll.append(tmp)
    ll_s = sorted(ll, key=lambda x:(x[0],-x[1]))
    for i in ll_s:
        print(i[2])

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    a, b = map(int, input().split())
    if a >= 13:
        print(b)
    elif a >= 6:
        print(int(b/2))
    else:
        print(0)
if __name__ == '__main__':
    main(

Fixed submission:
def main():
    a, b = map(int, input().split())
    if a >= 13:
        print(b)
    elif a >= 6:
        print(int(b/2))
    else:
        print(0)
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for i in range(m)]
    res = [0] * n
    for i in ab:
        res[i[0] - 1] += 1
        res[i[1] - 1] += 1
    for i in res:
        print(i)
if __name__ == '__main__':
    main(

Fixed submission:
def main():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for i in range(m)]
    res = [0] * n
    for i in ab:
        res[i[0] - 1] += 1
        res[i[1] - 1] += 1
    for i in res:
        print(i)
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
p, q, r = map(int, input().split())
print(min([p + q, q + r. r + p]))

Fixed submission:
p, q, r = map(int, input().split())
print(min([p + q, q + r, r + p]))
Buggy python submission (verdict: Runtime Error):
n = int(import())
if n == 25:
  print("Christmas")
elif n == 24:
  print("Christmas Eve")
elif n == 23:
  print("Christmas Eve Eve")
else:
  print("Christmas Eve Eve Eve")


Fixed submission:
n = int(input())
if n == 25:
    print("Christmas")
elif n == 24:
    print("Christmas Eve")
elif n == 23:
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")

Buggy python submission (verdict: Runtime Error):
n = int(input())
2.2.if n == 25:
3.3.  print("Christmas")
4.4.elif n == 24:
5.5.  print("Christmas Eve")
6.6.elif n == 23:
7.7.  print("Christmas Eve Eve")
8.8.else:
9.9.  print("Christmas Eve Eve Eve")


Fixed submission:
n = int(input())
if n == 25:
    print("Christmas")
elif n == 24:
    print("Christmas Eve")
elif n == 23:
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")

Buggy python submission (verdict: Runtime Error):
n = int(imput())
2.if n == 25:
3.  print("Christmas")
4.elif n == 24:
5.  print("Christmas Eve")
6.elif n == 23:
7.  print("Christmas Eve Eve")
8.else:
9.  print("Christmas Eve Eve Eve")


Fixed submission:
n = int(input())
if n == 25:
    print("Christmas")
elif n == 24:
    print("Christmas Eve")
elif n == 23:
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")

Buggy python submission (verdict: Runtime Error):
n = int(import())
if n == 25:
  print("Christmas")
elif n == 24:
  print("Christmas Eve")
elif n == 23:
  print("Christmas Eve Eve")
else:
  print("Christmas Eve Eve Eve")

Fixed submission:
n = int(input())
if n == 25:
    print("Christmas")
elif n == 24:
    print("Christmas Eve")
elif n == 23:
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")
Buggy python submission (verdict: Runtime Error):
a = 0
c = 0
for i in range(int(input())):
	b = int(input())
	if b > a:
        a = b
        c += a
    else:
        c += b
c += (a/2)
print (round(c))


Fixed submission:
a = 0
c = 0
for i in range(int(input())):
    b = int(input())
    if b > a:
        c += a
        a = b
    else:
        c += b
c += (a/2)
print (round(c))
Buggy python submission (verdict: Time Limit Exceeded):
def b(n): # n次元バーガー
    if n == 0:
        return "P "
    else:
        return "B " + b(n-1) + "P " + b(n-1) + "B "
n, x= map(int, input().split())
print(b(n).split(" ", x).count("P"))

Fixed submission:
def m(n): # n次元バーガーの層数
    if n == 0:
        return 1
    else:
        a = 1
        for i in range(n):
            a = a * 2 + 3
        return a

def paty(n): # n次元バーガーのパティの数
    a = 1
    if n >= 1:
        for i in range(n):
            a = a * 2 + 1
    return a

def a(n, x): #これが答えを返す
    x = x - 1
    if x == 0 and n == 0:
        return 1
    elif x == 0:
        return 0
    elif x == m(n-1) + 1:
        return paty(n-1) + 1
    elif x == m(n):
        return paty(n)
    elif x > m(n-1):
        return paty(n-1) + 1 + a(n - 1, x - m(n-1) - 1)
    else:
        n = n - 1
        return a(n, x)

n, x= map(int, input().split())
print(a(n, x))

Buggy python submission (verdict: Runtime Error):
def b(n): # n次元バーガー
    if n == 0:
        return("P")
    else:
        return("B",b(n-1),"P",b(n-1),"B")
n, x= map(int, input().split())
print(b(n).split("", x).count("P"))


Fixed submission:
def m(n): # n次元バーガーの層数
    if n == 0:
        return 1
    else:
        a = 1
        for i in range(n):
            a = a * 2 + 3
        return a

def paty(n): # n次元バーガーのパティの数
    a = 1
    if n >= 1:
        for i in range(n):
            a = a * 2 + 1
    return a

def a(n, x): #これが答えを返す
    x = x - 1
    if x == 0 and n == 0:
        return 1
    elif x == 0:
        return 0
    elif x == m(n-1) + 1:
        return paty(n-1) + 1
    elif x == m(n):
        return paty(n)
    elif x > m(n-1):
        return paty(n-1) + 1 + a(n - 1, x - m(n-1) - 1)
    else:
        n = n - 1
        return a(n, x)

n, x= map(int, input().split())
print(a(n, x))
Buggy python submission (verdict: Runtime Error):
n = input()
m = (n // 7) * 7
if m == n:
    print("Yes")
elif m - n <= n // 7:
    print("Yes")
else:
     print("No")

Fixed submission:
n = int(input())
m = [7 * i for i in range(15)]
for i in range(15):
    for j in range(26):
        m.append(m[i] + 4 * j)
if n in set(m):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = str(input())
sn = 0
for i in range(len(n)):
    sn += int(n[i])
if n % sn == 0:
    print("Yes")
else:
    print("No")

Fixed submission:
n = str(input())
sn = 0
for i in range(len(n)):
    sn += int(n[i])
if int(n) % sn == 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a = [int(input()) for i in range(4)]
print(min(a[0] + a[1]) + min(a[2] + a[3]))

Fixed submission:
a = [int(input()) for i in range(4)]
print(min(a[0], a[1]) + min(a[2], a[3]))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().solit())
if a + b >= c:
    print("Yes")
else:
    print("No")

Fixed submission:
a, b, c = map(int, input().split())
if a + b >= c:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
if int(input()) + int(input()) >= int(input()):
    print("Yes")
else:
    print("No")

Fixed submission:
a, b, c = map(int, input().split())
if a + b >= c:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
if input() + input() >= input():
    print("Yes")
else:
    print("No")

Fixed submission:
a, b, c = map(int, input().split())
if a + b >= c:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
ans = 0
n = int(input())
blue = [input() for i in range(n)]
m = int(input())
red = [input() for i in range(m)]
for i in range(m):
    if red[m] in blue:
        blue.remove(red[m])
for j in list(set(blue)):
    if blue.count(j) > ans:
        ans = blue.count(j)
print(ans)


Fixed submission:
ans = 0
n = int(input())
blue = [input() for i in range(n)]
m = int(input())
red = [input() for i in range(m)]
for i in range(m):
    if red[i] in blue:
        blue.remove(red[i])
for j in list(set(blue)):
    if blue.count(j) > ans:
        ans = blue.count(j)
print(ans)

Buggy python submission (verdict: Runtime Error):
ans = 0
n = int(input())
blue = [input() for i in range(n)]
m = int(input())
red = [input() for i in range(m)]
print(blue)
for i in range(m):
    if red[m] in blue:
        blue.remove(red[m])
for j in list(set(blue)):
    if blue.count(j) > ans:
        ans = blue.count(j)
print(ans)

Fixed submission:
ans = 0
n = int(input())
blue = [input() for i in range(n)]
m = int(input())
red = [input() for i in range(m)]
for i in range(m):
    if red[i] in blue:
        blue.remove(red[i])
for j in list(set(blue)):
    if blue.count(j) > ans:
        ans = blue.count(j)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
red = [list(map(int, input().split())) for i in range(n)]
blue = [list(map(int, input().split())) for i in range(n)]
red.sort()
blue.sort()
ans = 0
for i in range(n):
    for j in range(len(red)):
        if blue[i][0] > red[j][0] and blue[i][1] > red[j][1]:
            a = j
    if blue[i][0] > red[a][0] and blue[i][1] > red[a][1]:
        ans += 1
        del red[a]
print(ans)

Fixed submission:
n = int(input())
red = [list(map(int, input().split())) for i in range(n)]
blue = [list(map(int, input().split())) for i in range(n)]
red = sorted(red, key = lambda x: x[1])
blue.sort()
ans = 0
for i in range(n):
    a = 0
    for j in range(len(red)):
        if blue[i][0] > red[j][0] and blue[i][1] > red[j][1]:
            a = j
    if blue[i][0] > red[a][0] and blue[i][1] > red[a][1]:
        ans += 1
        del red[a]
print(ans)
Buggy python submission (verdict: Runtime Error):
list = [input() for i in range(3)]
print(list[0][0] + list[1][1] + list[2][2]

Fixed submission:
list = [input() for i in range(3)]
print(list[0][0] + list[1][1] + list[2][2])
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
ans = 0
for n in range(a, b+1):
    if n[0] == n[4] and n[1] == n[3]:
        ans += 1
print(ans)

Fixed submission:
a, b = map(int, input().split())
ans = 0
for n in range(a, b+1):
    if str(n)[0] == str(n)[4] and str(n)[1] == str(n)[3]:
        ans += 1
print(ans)