Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-

array = input().split()
a, b = int(array[0]), int(array[1])

x = a+b
print(int(math.log10(x) + 1))

Fixed submission:
# -*- coding:utf-8 -*-
import sys
import math

array =[]
for line in sys.stdin:
    array.append(line)
    
for i in range(len(array)):
    num = array[i].split(' ')
    a = int(num[0])
    b = int(num[1])
    n = a + b
    print(int(math.log10(n) + 1))

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-

while True:
    array = input().split()
    a, b = int(array[0]), int(array[1])
    
    x = a+b
    print(int(math.log10(x) + 1))

Fixed submission:
# -*- coding:utf-8 -*-
import sys
import math

array =[]
for line in sys.stdin:
    array.append(line)
    
for i in range(len(array)):
    num = array[i].split(' ')
    a = int(num[0])
    b = int(num[1])
    n = a + b
    print(int(math.log10(n) + 1))

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import sys
import math

array =[]
for line in sys.stdin:
    array.append(line)

for i in range(array):
    num = array[i].sprit(' ')
    a = num[0]
    b = num[1]
    n = a + b
    print(int(math.log10(x) + 1))

Fixed submission:
# -*- coding:utf-8 -*-
import sys
import math

array =[]
for line in sys.stdin:
    array.append(line)
    
for i in range(len(array)):
    num = array[i].split(' ')
    a = int(num[0])
    b = int(num[1])
    n = a + b
    print(int(math.log10(n) + 1))

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
#Write a program which computes the digit number of sum of two integers a and b.
import sys
import math

array =[]
for line in sys.stdin:
    try:
        array.append(line)
    except EOFError:
        break
    
for i in range(array):
    num = array[i].sprit(' ')
    a = num[0]
    b = num[1]
    n = a + b
    print(int(math.log10(x) + 1))

Fixed submission:
# -*- coding:utf-8 -*-
import sys
import math

array =[]
for line in sys.stdin:
    array.append(line)
    
for i in range(len(array)):
    num = array[i].split(' ')
    a = int(num[0])
    b = int(num[1])
    n = a + b
    print(int(math.log10(n) + 1))
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
def check_para(x1,y1,x2,y2,x3,y3,x4,y4):
    k1 = (y2-y1)/(x2-x1)
    k2 = (y4-y3)/(x4-x3)
    if k1 == k2:
        print('YES')
    else:
        print('NO')

n = int(input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
    check_para(x1,y1,x2,y2,x3,y3,x4,y4)

Fixed submission:
# -*- coding:utf-8 -*-
def check_para(x1,y1,x2,y2,x3,y3,x4,y4):
    if x1 == x2 and x4 == x3:
        print('YES')
        return 0
    elif x1 == x2 or x3 == x4:
        print('NO')
        return 0
    k1 = (y2-y1)/(x2-x1)
    k2 = (y4-y3)/(x4-x3)
    if abs(k1-k2) < 1e-10:
        print('YES')
    else:
        print('NO')

n = int(input())
for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
    check_para(x1,y1,x2,y2,x3,y3,x4,y4)

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
def check_para(x1,y1,x2,y2,x3,y3,x4,y4):
    k1 = (y2-y1)/(x2-x1)
    k2 = (y4-y3)/(x4-x3)
    if abs(k1-k2) < 1e-10:
        print('YES')
    else:
        print('NO')

n = int(input())
for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
    check_para(x1,y1,x2,y2,x3,y3,x4,y4)

Fixed submission:
# -*- coding:utf-8 -*-
def check_para(x1,y1,x2,y2,x3,y3,x4,y4):
    if x1 == x2 and x4 == x3:
        print('YES')
        return 0
    elif x1 == x2 or x3 == x4:
        print('NO')
        return 0
    k1 = (y2-y1)/(x2-x1)
    k2 = (y4-y3)/(x4-x3)
    if abs(k1-k2) < 1e-10:
        print('YES')
    else:
        print('NO')

n = int(input())
for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
    check_para(x1,y1,x2,y2,x3,y3,x4,y4)
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import sys
array = []
for i in sys.stdin:
    array.append(int(i))

data = [0]*100
for i in range(len(array)):
    data[array[i]] += 1
    
m = [i for i,j in enumerate(data) if j == max(data)]
for i in range(len(m)):
    print(m[i])

Fixed submission:
# -*- coding:utf-8 -*-
array = []
while True:
    try:
        a = int(input())
        array.append(a)
    except EOFError:
        break

data = [0]*101
for i in range(len(array)):
    data[array[i]] += 1
    
m = [i for i,j in enumerate(data) if j == max(data)]
for i in range(len(m)):
    print(m[i])
Buggy python submission (verdict: Time Limit Exceeded):
n = []
while True:
    try:
        tmp = int(input())
        if tmp == 0:
            break
        else:
            n.append(tmp)
    except EOFError:
        break

for i in range(len(n)):
    f = 1
    for j in range(1,n[i]+1):
        f *= j
    k = 0
    while True:
        if f % (10 ** k) != 0:
            print(k-1)
            break
        else:
            k += 1

Fixed submission:
n = []
while True:
    try:
        tmp = int(input())
        if tmp == 0:
            break
        else:
            n.append(tmp)
    except EOFError:
        break

for i in range(len(n)):
    c = 0
    d = 5
    for j in range(1,n[i]+1):
        while d <= n[i]:
            c += (n[i]//d)
            d *= 5
    print(c)

Buggy python submission (verdict: Time Limit Exceeded):
import math
# ????????§??????????????????????????????
def fact(n):
    sum = 0
    for i in range(1,n+1):
        sum += math.log(i)
    return math.exp(sum)
def fact2(n):
    return math.sqrt(2*math.pi*n)*(n/math.exp(1))**n

n = []
while True:
    try:
        tmp = int(input())
        if tmp == 0:
            break
        else:
            n.append(tmp)
    except EOFError:
        break

for i in range(len(n)):
    f = math.factorial(n[i])
    k = 0
    while True:
        if f % (10 ** k) != 0:
            print(k-1)
            break
        else:
            k += 1

Fixed submission:
n = []
while True:
    try:
        tmp = int(input())
        if tmp == 0:
            break
        else:
            n.append(tmp)
    except EOFError:
        break

for i in range(len(n)):
    c = 0
    d = 5
    for j in range(1,n[i]+1):
        while d <= n[i]:
            c += (n[i]//d)
            d *= 5
    print(c)

Buggy python submission (verdict: Time Limit Exceeded):
import math
# ????????§??????????????????????????????
def fact(n):
    sum = 0
    for i in range(1,n+1):
        sum += math.log(i)
    return math.exp(sum)
# ????????????????????§??????
def fact2(n):
    return math.sqrt(2*math.pi*n)*(n/math.exp(1))**n

def mfactorial(n, _factcache={}):
  if n not in _factcache:
    _factcache[n] = math.factorial(n)
  return _factcache[n]


n = []
while True:
    try:
        tmp = int(input())
        if tmp == 0:
            break
        else:
            n.append(tmp)
    except EOFError:
        break

for i in range(len(n)):
    f = mfactorial(n[i])
    k = 0
    while True:
        if f % (10 ** k) != 0:
            print(k-1)
            break
        else:
            k += 1

Fixed submission:
n = []
while True:
    try:
        tmp = int(input())
        if tmp == 0:
            break
        else:
            n.append(tmp)
    except EOFError:
        break

for i in range(len(n)):
    c = 0
    d = 5
    for j in range(1,n[i]+1):
        while d <= n[i]:
            c += (n[i]//d)
            d *= 5
    print(c)
Buggy python submission (verdict: Runtime Error):
def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

n = []
while True:
    tmp = int(input())
    if tmp == 0:
        break
    n.append(tmp)
m = max(n)
p = sieve(10000)

for i in range(len(n)):
    sum = 0
    for j in range(n[i]):
        sum += p[j]
    print(sum)

Fixed submission:
def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

n = []
while True:
    tmp = int(input())
    if tmp == 0:
        break
    n.append(tmp)
m = max(n)
p = sieve(500000)

for i in range(len(n)):
    sum = 0
    if n[i] == 1:
        print(2)
    else:
        for j in range(n[i]):
            sum += p[j]
        print(sum)

Buggy python submission (verdict: Runtime Error):
def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

n = []
while True:
    tmp = int(input())
    if tmp == 0:
        break
    n.append(tmp)
m = max(n)
p = sieve(10000)

for i in range(len(n)):
    sum = 0
    if n[i] == 1:
        print(2)
    else:
        for j in range(n[i]):
            sum += p[j]
        print(sum)

Fixed submission:
def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

n = []
while True:
    tmp = int(input())
    if tmp == 0:
        break
    n.append(tmp)
m = max(n)
p = sieve(500000)

for i in range(len(n)):
    sum = 0
    if n[i] == 1:
        print(2)
    else:
        for j in range(n[i]):
            sum += p[j]
        print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
def rec(x1,q):
    return x1-((x1**3-q)/(3*(x1**2)))

q = []
while True:
    try:
        tmp = int(input())
        if tmp == -1:
            break
        q.append(tmp)
    except EOFError:
        break
for i in range(len(q)):
    x1 = float(q[i]/2)
    for j in range(500000):
        x1 = rec(x1,q[i])
    print(x1)

Fixed submission:
def rec(x1,q):
    return x1-((x1**3-q)/(3*(x1**2)))

q = []
while True:
    try:
        tmp = int(input())
        if tmp == -1:
            break
        q.append(tmp)
    except EOFError:
        break
for i in range(len(q)):
    x1 = float(q[i]/2)
    while True:
        x1 = rec(x1,q[i])
        if abs(x1**3 - q[i]) < 0.00001*q[i]:
            break
    print(x1)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
data = input()
data = data.split()
x = int(data[0])
y = int(data[1])

def gcd(n,m):
    k = max(n,m)
    for i in range(k):
        if n%(k-i) == 0 and m%(k-i) == 0:
            return k-i

print(gcd(x,y))

Fixed submission:
# -*- coding:utf-8 -*-
def gcd(n,m):
    if n < m:
        tmp = m
        m = n
        n = tmp
    while m > 0:
        r = n % m
        n = m
        m = r
    return n
    
x, y = map(int,input().split())
print(gcd(x,y))

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
def gcd(n,m):
    k = max(n,m)
    for i in range(k):
        if n%(k-i) == 0 and m%(k-i) == 0:
            return k-i
x, y = map(int,input().split())
print(gcd(x,y))

Fixed submission:
# -*- coding:utf-8 -*-
def gcd(n,m):
    if n < m:
        tmp = m
        m = n
        n = tmp
    while m > 0:
        r = n % m
        n = m
        m = r
    return n
    
x, y = map(int,input().split())
print(gcd(x,y))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
count = 0
while True:
    try:
        n = int(input())
        if n == 2:
            count += 1
        for i in range(2,n):
            if n % i == 0:
                break
            elif i == n - 1:
                count += 1
    except  EOFError:
        break
print(count)

Fixed submission:
# -*- coding:utf-8 -*-
import math
count = 0
while True:
    try:
        n = int(input())
        if n == 2 or n == 3 or n == 5 or n == 7:
            count += 1
        if n > 3 and n % 2 != 0:
            for i in range(3,int(math.sqrt(n))+1):
                if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
    except  EOFError:
        break
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
count = 0
while True:
    try:
        n = int(input())
        if n == 2 or n == 3:
            count += 1
        if n > 3 and n % 2 != 0:
            for i in range(3,n):
                if n % i == 0:
                    break
                elif i == n - 1:
                    count += 1
    except  EOFError:
        break
print(count)

Fixed submission:
# -*- coding:utf-8 -*-
import math
count = 0
while True:
    try:
        n = int(input())
        if n == 2 or n == 3 or n == 5 or n == 7:
            count += 1
        if n > 3 and n % 2 != 0:
            for i in range(3,int(math.sqrt(n))+1):
                if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
    except  EOFError:
        break
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
S = list(map(int,input().split()))
q = int(input())
T = list(map(int,input().split()))

sum = 0
for c in T:
    left = 0
    right = n
    mid = 0
    while left < right:
        mid = int(( left + right ) / 2)
        if c == S[mid]:
            sum += 1
            break
print(sum)

Fixed submission:
n = int(input())
S = list(map(int,input().split()))
q = int(input())
T = list(map(int,input().split()))

sum = 0
for c in T:
    left = 0
    right = n
    mid = 0
    if c == S[left] or c == S[right-1]:
        sum += 1
    else:
        while left+1 < right:
            mid = int(( left + right ) / 2)
            if c == S[mid]:
                sum += 1
                break
            if c > S[mid]:
                left = mid
                mid = 0
            elif c < S[mid]:
                right = mid
                mid = 0
print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
n = int(input())
S = list(map(int,input().split()))
q = int(input())
T = list(map(int,input().split()))

sum = 0
for c in T:
    left = 0
    right = n
    mid = 0
    while left < right:
        mid = int(( left + right ) / 2)
        if c == S[mid]:
            sum += 1
            break
print(sum)

Fixed submission:
n = int(input())
S = list(map(int,input().split()))
q = int(input())
T = list(map(int,input().split()))

sum = 0
for c in T:
    left = 0
    right = n
    mid = 0
    if c == S[left] or c == S[right-1]:
        sum += 1
    else:
        while left+1 < right:
            mid = int(( left + right ) / 2)
            if c == S[mid]:
                sum += 1
                break
            if c > S[mid]:
                left = mid
                mid = 0
            elif c < S[mid]:
                right = mid
                mid = 0
print(sum)
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    x0,y0,x1,y1,x2,y2,x3,y3 = map(float,input().split())
    if x1 - x0 == 0:
        if x3 -x2 == 0:
            print('2')
        elif y3 - y2 == 0:
            print('1')
        else:
            print('0')
    elif x3 - x2 == 0:
        if y1 - y0 == 0:
            print('1')
        else:
            print('0')
    elif y1 - y0 == 0:
        if y3 - y2 == 0:
            print('2')
        elif x3 - x2 == 0:
            print('1')
        else:
            print('0')
    elif y3 - y2 == 0:
        elif x1 - x0 == 0:
            print('1')
        else:
            print('0')
    else:
        a1 = (y1-y0)/(x1-x0)
        a2 = (y3-y2)/(x3-x2)
        if a1 * a2 == -1:
            print('1')
        elif a1 == a2 or a1 == -a2:
            print('2')
        else:
            print('0')

Fixed submission:
import sys
 
 
def get_line(line_info):
    for line_pair in line_info:
        line_axis = tuple(map(int, line_pair))
        p0, p1, p2, p3 = (x + y * 1j for x, y in zip(line_axis[::2], line_axis[1::2]))
        # print(p0, p1, p2, p3)
        if dot(p1 - p0, p3 - p2) == 0:
            print('1')
        elif cross(p1 - p0, p3 - p2) == 0:
            print('2')
        else:
            print('0')
    return line_info
 
 
def cross(a, b):
    return a.real * b.imag - a.imag * b.real
 
 
def dot(a, b):
    return a.real * b.real + a.imag * b.imag
 
 
if __name__ == '__main__':
    _input = sys.stdin.readlines()
    questions = int(_input[0])
    lines = map(lambda x: x.split(), _input[1:])
    ans = get_line(lines)
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-

x,y = int(input()),int(input())

print(x*y)

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

x = input()
k = x.split(' ')
a = int(k[0])
b = int(k[1])

area = int(a) * int(b)
length = int(a)*2 + int(b)*2

print(area,length)

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-

x = input()
a = x[0]
b = x[2]

area = int(a) * int(b)
length = int(a)*2 + int(b)*2

print(area,length)

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

x = input()
k = x.split(' ')
a = int(k[0])
b = int(k[1])

area = int(a) * int(b)
length = int(a)*2 + int(b)*2

print(area,length)
Buggy python submission (verdict: Runtime Error):
r,c = map(int,input().split(' '))
arr = [[0 for i in range(c+1)] for i in range(r+1)]

for i in range(r):
    row = list(map(int,input().split(' ')))
    for j in range(c):
        arr[i][j] = row[j]

for i in range(r):
    for j in range(c):
        arr[i][-1] += arr[i][j]
for i in range(c):
    for j in range(r):
        arr[-1][i] += arr[j][i]
for i in range(r+1):
    arr[-1][-1] += arr[-1][i]

for i in range(c):
    for j in range(r+1):
        print(arr[i][j],end = ' ')
    print(arr[i][-1])

Fixed submission:
r,c = map(int,input().split(' '))
arr = [[0 for i in range(c+1)] for i in range(r+1)]

for i in range(r):
    row = list(map(int,input().split(' ')))
    for j in range(c):
        arr[i][j] = row[j]

for i in range(r):
    for j in range(c):
        arr[i][-1] += arr[i][j]
for i in range(c):
    for j in range(r):
        arr[-1][i] += arr[j][i]
        
if c == 1:
    for i in range(r):
        arr[-1][-1] += arr[i][0]
elif r == 1:
    for i in range(c):
        arr[-1][-1] += arr[0][i]
else:
    for i in range(r):
        arr[-1][-1] += arr[i][-1]
    
for i in range(r+1):
    for j in range(c):
        print(arr[i][j],end = ' ')
    print(arr[i][-1])
Buggy python submission (verdict: Runtime Error):
for x in range(10):
    for y in range(x, 9):
        print("%dx%d=%d" % x + 1, y + 1, (x + 1) * (y + 1))

Fixed submission:
for x in range(1, 10):
    for y in range(1, 10):
        print("%dx%d=%d" % (x, y, x * y))
Buggy python submission (verdict: Runtime Error):
import sys


print(sys.stdin[::-1])

Fixed submission:
a = 1
while a:
    print(input()[::-1])
    a = 0

Buggy python submission (verdict: Runtime Error):
import sys
print(sys.stdin[::-1])

Fixed submission:
a = 1
while a:
    print(input()[::-1])
    a = 0

Buggy python submission (verdict: Runtime Error):
import sys
print(sys.stdin()[::-1])

Fixed submission:
a = 1
while a:
    print(input()[::-1])
    a = 0

Buggy python submission (verdict: Runtime Error):
 for i in range(1):
   print(input()[::-1])

Fixed submission:
a = 1
while a:
    print(input()[::-1])
    a = 0

Buggy python submission (verdict: Runtime Error):
 for i in range(1):
        print(input()[::-1])

Fixed submission:
a = 1
while a:
    print(input()[::-1])
    a = 0

Buggy python submission (verdict: Runtime Error):
 for i in range(1):
print(input()[::-1])

Fixed submission:
a = 1
while a:
    print(input()[::-1])
    a = 0

Buggy python submission (verdict: Runtime Error):
 for i in range(1):
    print(input()[::-1])

Fixed submission:
a = 1
while a:
    print(input()[::-1])
    a = 0
Buggy python submission (verdict: Runtime Error):
x = input()

n = 100000
while x > 0:
    n *= 1.05
    mod = n % 1000
    if mod != 0:
        n = n + 1000 - mod
    x -= 1

print(int(n))

Fixed submission:
x = int(input())

n = 100000
while x > 0:
    n *= 1.05
    mod = n % 1000
    if mod:
        n += 1000 - mod
    x -= 1

print(int(n))

Buggy python submission (verdict: Runtime Error):
x = raw_input()

n = 100000
while x > 0:
    n *= 1.05
    mod = n % 1000
    if mod != 0:
        n = n + 1000 - mod
    x -= 1

print(int(n))

Fixed submission:
x = int(input())

n = 100000
while x > 0:
    n *= 1.05
    mod = n % 1000
    if mod:
        n += 1000 - mod
    x -= 1

print(int(n))
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
2 x = input()
3 print x*x*x

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

def main():
    """ エントリポイントだよ。

    """
    x = int(input())
    print(str(x ** 3))


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
#coding:utf-8
2 x = input()
3 print x**3

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

def main():
    """ エントリポイントだよ。

    """
    x = int(input())
    print(str(x ** 3))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
a = input()
b = input()
print (str(a*b) + " " + str(2*a+2*b))

Fixed submission:
#coding:utf-8
a,b=map(int,raw_input().split())
print a*b, 2*a+2*b

Buggy python submission (verdict: Runtime Error):
#coding:utf-8
a = input()
b = input()
print a*b, 2*a+2*b

Fixed submission:
#coding:utf-8
a,b=map(int,raw_input().split())
print a*b, 2*a+2*b
Buggy python submission (verdict: Runtime Error):
m = [int(l) for l in input()]
m.sort()
print(sort[-1])
print(sort[-2])
print(sort[-3])

Fixed submission:
import sys
m = [int(l) for l in sys.stdin]
m.sort()
print(m[-1])
print(m[-2])
print(m[-3])
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
  h = list(map(int,input()))
  h.sort()
  if h[0]**2 ++ h[1]**2 == h[2]**2:
    print('YES')
  else:
    print('NO')

Fixed submission:
n = int(input())
for i in range(n):
  h = list(map(int,input().split()))
  h.sort()
  if h[0]**2 ++ h[1]**2 == h[2]**2:
    print('YES')
  else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
from math import ceil
n=int(input())
print((int(ceil(10*(1.05)**n))*10000)

Fixed submission:
from math import ceil
n = int(input())

a = 100
for i in range(n):
    a=ceil(1.05 * a)
print (a*1000)
Buggy python submission (verdict: Runtime Error):
def ascii2num(ascii):
    return ord(ascii) - 96

def num2ascii(num):
    return chr(num + 96)

def slide(word,num):
    return ''.join([num2ascii((ascii2num(ascii) + num) % 26) if ascii != '.' else '.' for ascii in word])

def includekeyword(words):
    for word in words:
        if word in keywords:
            return True
    return False

keywords = ['the', 'this', 'that']


decode = []
for row in stdin:
    words = row.split()
    for num in range(1,27):
        tmp = [slide(word,num) for word in words]
        if includekeyword(tmp):
            decode = tmp
            print(' '.join(decode))

Fixed submission:
from sys import stdin

def ascii2num(ascii):
    return ord(ascii) - 96

def num2ascii(num):
    return chr(num + 96)

def slide(word,num):
    return ''.join([num2ascii((ascii2num(ascii) - num) % 26 + 1) if ascii != '.' else '.' for ascii in word])

def includekeyword(words):
    for word in words:
        if word in keywords:
            return True
    return False

keywords = ['the', 'this', 'that']

decode = []
for row in stdin:
    words = row.split()
    for num in range(1,27):
        tmp = [slide(word,num) for word in words]
        if includekeyword(tmp):
            decode = tmp
            print(' '.join(decode))
            break
Buggy python submission (verdict: Runtime Error):
from math import factorial
n = int(input())
print factorial(n)

Fixed submission:
from math import factorial
n = int(input())
print (factorial(n))
Buggy python submission (verdict: Runtime Error):
s = input().split()
ss = []
for w in s:
    a = w.find('apple')
    p = w.find('peach')
    if a != -1:
        w = w.replace('apple','peach')
    elif p != -1:
        w = w.replace('peach','apple')
    ss.append(word)
print(' '.join(ss))

Fixed submission:
s = input().split()
ss = []
for w in s:
    a = w.find('apple')
    p = w.find('peach')
    if a != -1:
        w = w.replace('apple','peach')
    elif p != -1:
        w = w.replace('peach','apple')
    ss.append(w)
print(' '.join(ss))