Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
for i in rang(1,10):
 for j in range(1,10):
  print "%dx%d=%d"%(i,j,i*j)

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
       print("{0}x{1}={2}".format(i,j,i*j))

Buggy python submission (verdict: Runtime Error):
for i in rang(1,10):
??for j in range(1,10):
????print "%dx%d=%d"%(i,j,i*j)

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
       print("{0}x{1}={2}".format(i,j,i*j))

Buggy python submission (verdict: Runtime Error):
for i in range(1,10):
??for j in range(1,10):
????print "%dx%d=%d"%(i,j,i*j)

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
       print("{0}x{1}={2}".format(i,j,i*j))

Buggy python submission (verdict: Runtime Error):
for i in range(1,10):
??for j in range(1,10):
????print  "%dx%d=%d" %(i,j,i*j)

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
       print("{0}x{1}={2}".format(i,j,i*j))

Buggy python submission (verdict: Runtime Error):
for i in range(1,10):
??for j in range(1,10):
????print  "%dx%d=%d" %(i , j,i*j)

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
       print("{0}x{1}={2}".format(i,j,i*j))
Buggy python submission (verdict: Runtime Error):
print x**3

Fixed submission:
x=int(input())
print(x**3)

Buggy python submission (verdict: Runtime Error):
print(x**3)

Fixed submission:
x=int(input())
print(x**3)

Buggy python submission (verdict: Runtime Error):
x=input()
print(x**3)

Fixed submission:
x=int(input())
print(x**3)
Buggy python submission (verdict: Runtime Error):
for i in range(1:10):
    for j in range(1:10):
        print(i*j)

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
        print("{}x{}={}".format(i,j,i*j))
Buggy python submission (verdict: Runtime Error):
from math import log10 as log
A = []
while True:
    S =list(map(int,input().split()))
    try:
        A.append(int(log(S[0]+S[1])+1))
    except IndexError:
        break
for i in A:
    print(i)

Fixed submission:
from math import log10 as log
from sys import stdin
A = []
for po in stdin:
    S = list(map(int,po.split()))
    A.append(int(log(S[0]+S[1])+1))
for i in A:
    print(i)
Buggy python submission (verdict: Runtime Error):
from math import gcd
from sys import stdin

for line in stdin:
    a,b = [int(i) for i in line.split()]
    g = gcd(a,b)
    print(g,int(a*b/g)

Fixed submission:
from math import gcd
from sys import stdin

for line in stdin:
    a,b = [int(i) for i in line.split()]
    g = gcd(a,b)
    print(g,int(a*b/g))
Buggy python submission (verdict: Runtime Error):
input()**3

Fixed submission:
print(int(input()) ** 3)
Buggy python submission (verdict: Runtime Error):
a b = input()
if a < b:
    print("a < b")
elif a > b:
    print("a > b")
elif a == b:
    print("a == b")

Fixed submission:
memo = input().split()
a,b = [int(i) for i in memo]
if a < b:
    print("a < b")
elif a > b:
    print("a > b")
elif a == b:
    print("a == b")
Buggy python submission (verdict: Runtime Error):
memo = input().spllit()
a,b,c = [int(x) for x in memo]
if(a < b && b < c):
    print("Yes")
else:
    print("No")

Fixed submission:
memo = input().split()
a,b,c = [int(x) for x in memo]
if a < b and b < c :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
memo = input().split()
a,b,c = [int(x) for x in memo]
if(a < b && b < c):
    print("Yes")
else:
    print("No")

Fixed submission:
memo = input().split()
a,b,c = [int(x) for x in memo]
if a < b and b < c :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
memo = input().split()
a,b,c = [int(x) for x in memo]
if(a < b && b < c):
    print("Yes")
else:
    print("No")

Fixed submission:
memo = input().split()
a,b,c = [int(x) for x in memo]
if a < b and b < c :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
memo = input().split()
a,b,c = [int(x) for x in memo]
if a < b && b < c :
    print("Yes")
else:
    print("No")

Fixed submission:
memo = input().split()
a,b,c = [int(x) for x in memo]
if a < b and b < c :
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import numpy as np
while 1:
    global a,c
    c = np.array([[0]*14]*14)
    a = np.array([[0]*14]*14)
    a[1:-1,1:-1] = [list(map(int,list(input()))) for i in range(12)]


    def dfs(x,y,n):
        if c[x][y] == 0 and a[x][y] == 1:
            c[x][y] = n
            [dfs(x+i, y+j, n) for i,j in [(-1,0),(1,0),(0,-1),(0,1)]]


    [[dfs(x,y,12*x + y) for x in range(1,12+1)] for y in range(1,12+1)]
    flat = [a for b in c for a in b]
    print(len(set(flat)) - 1)
    dump = input()
    #if input() ==


Fixed submission:
state = 1
while(state):
    a = [[0 for i in range(12)] for j in range(12)]
    for i in range(12):
        a[i] = [int(i) for i in list(input())]
    try:
        _ = input()
    except EOFError:
        state = 0

    def erase(y,x):
        if a[y][x] != 0:
            a[y][x] = 0
            if x-1 > -1:
                erase(y,x-1)
            if x+1 < 12:
                erase(y,x+1)
            if y-1 > -1:
                erase(y-1,x)
            if y+1 < 12:
                erase(y+1,x)

    count = 0
    for i in range(12):
        for j in range(12):
            if a[i][j] != 0:
                count += 1
                erase(i,j)
    print(count)

Buggy python submission (verdict: Runtime Error):
import numpy as np
while 1:
    global a,c
    c = np.array([[0]*14]*14)
    a = np.array([[0]*14]*14)
    a[1:-1,1:-1] = [list(map(int,list(input()))) for i in range(12)]


    def dfs(x,y,n):
        if c[x][y] == 0 and a[x][y] == 1:
            c[x][y] = n
            [dfs(x+i, y+j, n) for i,j in [(-1,0),(1,0),(0,-1),(0,1)]]


    [[dfs(x,y,12*x + y) for x in range(1,12+1)] for y in range(1,12+1)]
    flat = [a for b in c for a in b]
    print(len(set(flat)) - 1)
    if input() is None:
        break



Fixed submission:
state = 1
while(state):
    a = [[0 for i in range(12)] for j in range(12)]
    for i in range(12):
        a[i] = [int(i) for i in list(input())]
    try:
        _ = input()
    except EOFError:
        state = 0

    def erase(y,x):
        if a[y][x] != 0:
            a[y][x] = 0
            if x-1 > -1:
                erase(y,x-1)
            if x+1 < 12:
                erase(y,x+1)
            if y-1 > -1:
                erase(y-1,x)
            if y+1 < 12:
                erase(y+1,x)

    count = 0
    for i in range(12):
        for j in range(12):
            if a[i][j] != 0:
                count += 1
                erase(i,j)
    print(count)
Buggy python submission (verdict: Runtime Error):
while 1:
    n,k = [int(i) for i in input().split()]
    if not n and k:
        break
    a = [int(input()) for i in range(n)]
    b = [0]*len(a)

    for i in range(n):
        b[i] = b[i-1] + a[i]
    b = b + [0]

    c = [b[i + k - 1] - b[i - 1] for i in range(n - k + 1)]

    print(max(c))


Fixed submission:
while 1:
    n,k = [int(i) for i in input().split()]
    if not (n and k):
        break
    a = [int(input()) for i in range(n)]
    b = [0]*len(a)

    for i in range(n):
        b[i] = b[i-1] + a[i]
    b = b + [0]

    c = [b[i + k - 1] - b[i - 1] for i in range(n - k + 1)]

    print(max(c))
Buggy python submission (verdict: Runtime Error):
while(1):
    a,b = [int(i) for i in input().split()]
    if a == 0 and b == 0:
        break
    c = [a,b]
    c.sort()
    print(*c,sep=" ")


Fixed submission:
while(1):
    a,b = [int(i) for i in input().split()]
    if a == 0 and b == 0:
        break
    c = [a,b]
    c.sort()
    print(*c,sep=" ")
Buggy python submission (verdict: Runtime Error):
w = int(input())
n = int(input())
l = list(range(1,w+1))
for i in range(n):
	a,b = map(int,input().split(','))
	a -= 1
	b - = 1
	l[a],l[b] = l[b],l[a]
for x in l:
	print(x)




Fixed submission:
w = int(input())
n = int(input())
l = list(range(1,w+1))
for i in range(n):
	a,b = map(int,input().split(','))
	a -= 1
	b -= 1
	l[a],l[b] = l[b],l[a]
for x in l:
	print(x)
Buggy python submission (verdict: Runtime Error):
import itertools

n = int(input())
a = sorted([int(input()) for i in range(n)])[:4]
b = []
for c,d in intertools.permutations(a,2):
    b += [c * 10**len(str(d)) + d]
print(sorted(b)[2])


Fixed submission:
import itertools

n = int(input())
a = sorted([int(input()) for i in range(n)])[:4]
b = []
for c,d in itertools.permutations(a,2):
    b += [c * 10**len(str(d)) + d]
print(sorted(b)[2])
Buggy python submission (verdict: Runtime Error):
ab = int(input().split())
print(a*b, a*2+b*2, sep=" ")


Fixed submission:
a, b = map(int, input().split())
print(a*b, 2*(a+b))

Buggy python submission (verdict: Runtime Error):
ab = int(input().split())
print(ab[0]*ab[1], ab[0]*2+ab[1]*2, sep=" ")


Fixed submission:
a, b = map(int, input().split())
print(a*b, 2*(a+b))
Buggy python submission (verdict: Runtime Error):
sho = int(input()) // 60
amari = int(input()) % 60

h = sho // 60
m = sho % 60
s = amari

print("{}:{}:{}".format(h, m, s))


Fixed submission:
sho, s = divmod(int(input()), 60)
h, m = divmod(sho, 60)
print("{}:{}:{}".format(h, m, s))
Buggy python submission (verdict: Runtime Error):
num_sorted = list(map(int, input().split()))
print("{} {} {}".format(num_sorted.sort()[0], num_sorted.sort()[1], num_sorted.sort()[2]))


Fixed submission:
num_sorted = list(map(int, input().split()))
num_sorted.sort()
print("{} {} {}".format(num_sorted[0], num_sorted[1], num_sorted[2]))
Buggy python submission (verdict: Runtime Error):
WHxyr = list(map(int, input(),split()))
x_max = WHxyr[0] - WHxyr[4]
y_max = WHxyr[1] - WHxyr[4]
if x >= r and x <= x_max:
    if y >= r and y <= y_max:
        print("Yes")
    else:
        print("No")
else:
    print("No")


Fixed submission:
W,H,x,y,r = map(int, input().split())
x_max = W - r
y_max = H - r
if x >= r and x <= x_max:
    if y >= r and y <= y_max:
        print("Yes")
    else:
        print("No")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = []
for i in range(0,n):
    lst.append(int(input()))
print(lst.sort())


Fixed submission:
input()
print(" ".join(input().split()[::-1]))

Buggy python submission (verdict: Runtime Error):
n = int(input))
print(" ".join(list(map(int, input().split()))[::-1]))


Fixed submission:
input()
print(" ".join(input().split()[::-1]))

Buggy python submission (verdict: Runtime Error):
n = int(input)
lst = list(map(int, input().split()))
print(" ".join(lst[::-1]))


Fixed submission:
input()
print(" ".join(input().split()[::-1]))
Buggy python submission (verdict: Runtime Error):
from math import pi 
r = int(input())
S = pi * r ** 2 
L = 2 * pi * r
print("{0} {1}".format(S, L))

Fixed submission:
import math
r = input()
r = float(r)
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,6), round(L,6)))

Buggy python submission (verdict: Runtime Error):
from math import pi 
r = int(input())
S = pi * r ** 2 
L = 2 * pi * r
print("{0} {1}".format(S, L))

Fixed submission:
import math
r = input()
r = float(r)
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,6), round(L,6)))

Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(S, L))

Fixed submission:
import math
r = input()
r = float(r)
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,6), round(L,6)))

Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,5), round(L,5)))

Fixed submission:
import math
r = input()
r = float(r)
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,6), round(L,6)))

Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,5), round(L,5)))

Fixed submission:
import math
r = input()
r = float(r)
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,6), round(L,6)))

Buggy python submission (verdict: Runtime Error):
import math
r = input()
r = int(r)
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,6), round(L,6)))

Fixed submission:
import math
r = input()
r = float(r)
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,6), round(L,6)))

Buggy python submission (verdict: Runtime Error):
import math
r = input()
r = int(r)
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,6), round(L,6)))

Fixed submission:
import math
r = input()
r = float(r)
S = math.pi * r * r
L = 2 * math.pi * r
print("{0} {1}".format(round(S,6), round(L,6)))
Buggy python submission (verdict: Runtime Error):
while(1):
    word = input()
    if (word = "0"):
        break
    result = 0
    for i in word:
        result += int(i)
    print(result)
        

Fixed submission:
while(1):
    word = input()
    if (word == "0"):
        break
    result = 0
    for i in word:
        result += int(i)
    print(result)
Buggy python submission (verdict: Runtime Error):
word = [chr(i) for i in range(97, 97+26)]
word_number = []
line = ""
while(1):
    temp_line = input() 
    line += temp_line
    if temp_line =="":
        break

for target in word:
    count = 0
    for character in line:
        if character.lower() == target:
            count += 1
    word_number.append(count)

for i in range(26):
    print("{0} : {1}".format(word[i],word_number[i]))

Fixed submission:
import sys
word = [chr(i) for i in range(97, 97+26)]
word_number = []
lines = ""
for line in sys.stdin:
    lines += line

for target in word:
    count = 0
    for character in lines:
        if character.lower() == target:
            count += 1
    word_number.append(count)

for i in range(26):
    print("{0} : {1}".format(word[i],word_number[i]))
Buggy python submission (verdict: Runtime Error):
for a in range(10):

	for b in range(10):
		i = a x b
		print(a,"x" ,b ,"=",i)
	


Fixed submission:
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")

Buggy python submission (verdict: Runtime Error):
for a in range(10):
	for b in range(10):
		i = a x b
		print(a,"x" ,b ,"=",i)
	


Fixed submission:
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")

Buggy python submission (verdict: Runtime Error):
for a in range(10):
	for b in range(10):
		i = a x b
		print(a,"x",b,"=",i)


Fixed submission:
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")

Buggy python submission (verdict: Runtime Error):
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")
	


Fixed submission:
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")

Buggy python submission (verdict: Runtime Error):
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")
	


Fixed submission:
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")

Buggy python submission (verdict: Runtime Error):
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")
	


Fixed submission:
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")

Buggy python submission (verdict: Runtime Error):
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")
	


Fixed submission:
for a in range(1,10):
	for b in range(1,10):
		i = a * b
		print(a,"x",b,"=",i,sep="")
Buggy python submission (verdict: Runtime Error):
# Vol0005.


def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def get_gcd(x, y):
    if x < y: return get_gcd(y, x)
    # x >= yのときはx % yを計算してyとx % yの話にする。
    # ここでx % yのところが0ならばyが求める答えとなる。
    if y == 0: return x
    return get_gcd(y, x % y)

def main():
    data = []
    lines = sys.stdin.readlines()
    for line in lines:
        data.append(line.split())

    N = len(data)
    for i in range(N):
        a = int(data[i][0]); b = int(data[i][1])
        gcd = get_gcd(a, b)
        lcm = (a // gcd) * b
        print('%d %d' % (a, b))

if __name__ == "__main__":
    main()


Fixed submission:
# Vol0005.
import sys


def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def get_gcd(x, y):
    if x < y: return get_gcd(y, x)
    # x >= yのときはx % yを計算してyとx % yの話にする。
    # ここでx % yのところが0ならばyが求める答えとなる。
    if y == 0: return x
    return get_gcd(y, x % y)

def main():
    data = []
    lines = sys.stdin.readlines()

    for line in lines:
        data.append(line.split())

    N = len(data)
    for i in range(N):
        a = int(data[i][0]); b = int(data[i][1])
        gcd = get_gcd(a, b)
        lcm = (a // gcd) * b
        print('%d %d' % (gcd, lcm))

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
# ALDS1_4_B.
# バイナリサーチ。

def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    n = int(input())
    S = intinput()
    q = int(input())
    T = intinput()
    count = 0
    for k in T:
        if k in S: count += 1
    print(count)

    
if __name__ == "__main__":
    main()


Fixed submission:
# ALDS1_4_B.
# バイナリサーチ。

def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def binary_search(S, k):
    a = 0; b = len(S) - 1
    if b == 0: return S[0] == k
    while b - a > 1:
        c = (a + b) // 2
        if k <= S[c]: b = c
        else: a = c
    return S[a] == k or S[b] == k
    
def main():
    n = int(input())
    S = intinput()
    q = int(input())
    T = intinput()
    count = 0
    for k in T:
        if binary_search(S, k): count += 1
    print(count)

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

def floatinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = float(a[i])
    return a
   
def main():
    a = numinput()
    x1 = a[0]; y1 = a[1]; x2 = a[2]; y2 = a[3]
    print(math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
   
if __name__ == "__main__":
    main()



Fixed submission:
# AOJ ITP1_10_A

import math

def floatinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = float(a[i])
    return a

def main():
    data = floatinput()
    x1 = data[0]; y1 = data[1]; x2 = data[2]; y2 = data[3]
    print(math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2))

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import math
 
def floatinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = float(a[i])
    return a
    
def main():
    a = numinput()
    x1 = a[0]; y1 = a[1]; x2 = a[2]; y2 = a[3]
    print(math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2))
    
if __name__ == "__main__":
    main()


Fixed submission:
# AOJ ITP1_10_A

import math

def floatinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = float(a[i])
    return a

def main():
    data = floatinput()
    x1 = data[0]; y1 = data[1]; x2 = data[2]; y2 = data[3]
    print(math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2))

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

import math

def floatinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = float(a[i])
    return a

def main():
    data = floatinput()
    a = data[0]; b = data[1]; C = data[2]
    S = a * b * 0.5 * math.cos(math.radians(C))
    c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(C)))
    L = a + b + c
    h = b * math.sin(math.radians(C))
    print(S); print(L): print(h)

if __name__ == "__main__":
    main()


Fixed submission:
# AOJ ITP1_10_A

import math

def floatinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = float(a[i])
    return a

def main():
    data = floatinput()
    a = data[0]; b = data[1]; C = data[2]
    S = a * b * 0.5 * math.sin(math.radians(C))
    c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(C)))
    L = a + b + c
    h = b * math.sin(math.radians(C))
    print(S); print(L); print(h)

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

import math

def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    while True:
        n = int(input())
        if n == 0: break
        data = intinput()
        sum_1 = 0  # 1乗の総和
        sum_2 = 0  # 2乗の総和
        for i in range(n):
            sum_1 += data[i]; sum_2 += data[i] ** 2
        sigma = math.sqrt((sum_2 - (sum_1 ** 2)) / n)
        print(sigma)

if __name__ == "__main__":
    main()


Fixed submission:
# AOJ ITP1_10_C

import math

def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    while True:
        n = int(input())
        if n == 0: break
        data = intinput()
        sum_1 = 0  # 1乗の総和
        sum_2 = 0  # 2乗の総和
        for i in range(n):
            sum_1 += data[i]; sum_2 += data[i] ** 2
        # print('(%d, %d)' % (sum_1, sum_2))
        sigma = math.sqrt((sum_2 / n) - ((sum_1 / n) ** 2))
        print(sigma)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    a = int(input())
    b = int(input())
    print('%d %d' % (a * b, 2 * (a + b)))

if __name__ == "__main__":
    main()



Fixed submission:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d' % (a[0] * a[1], 2 * (a[0] + a[1])))

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    a = []
    for i in range(2):
        a.append(int(input()))
    print(str(a[0] * a[1]) + " " + str(2 * (a[0] + a[1])))

if __name__ == "__main__":
    main()


Fixed submission:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d' % (a[0] * a[1], 2 * (a[0] + a[1])))

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d' % (a[0] * a[1], 2 * (a[0] + a[1]))

if __name__ == "__main__":
    main()


Fixed submission:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d' % (a[0] * a[1], 2 * (a[0] + a[1])))

if __name__ == "__main__":
    main()