Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys

x = []

for line in sys.stdin.readline():
    x.append(int(line))

length = int(x[0])

del x[0]

max = -(10 ** 9)

for i in range(0, length - 1):
    for j in range(i + 1, length):
        sa = int(x[j]) - int(x[i])
        if max < sa:
            max = sa

print max

Fixed submission:
import sys

x = []

for line in sys.stdin.readlines():
    x.append(int(line.strip()))

length = int(x[0])

del x[0]

max = -(10 ** 9)
min =  x[0]

for i in range(1, length):
    sa = x[i] - min

    if sa > max:
        max = sa

    if x[i] < min:
        min = x[i]
   
print max

Buggy python submission (verdict: Runtime Error):
import sys

x = []

for line in raw_input():
    x.append(int(line))

length = int(x[0])

del x[0]

max = -(10 ** 9)

for i in range(0, length - 1):
    for j in range(i + 1, length):
        sa = int(x[j]) - int(x[i])
        if max < sa:
            max = sa

print max

Fixed submission:
import sys

x = []

for line in sys.stdin.readlines():
    x.append(int(line.strip()))

length = int(x[0])

del x[0]

max = -(10 ** 9)
min =  x[0]

for i in range(1, length):
    sa = x[i] - min

    if sa > max:
        max = sa

    if x[i] < min:
        min = x[i]
   
print max

Buggy python submission (verdict: Time Limit Exceeded):
import sys

x = []

for line in sys.stdin.readlines():
    x.append(int(line.strip()))

length = int(x[0])

del x[0]

max = -(10 ** 9)

for i in range(0, length - 1):
    for j in range(i + 1, length):
        sa = int(x[j]) - int(x[i])
        if max < sa:
            max = sa

print max

Fixed submission:
import sys

x = []

for line in sys.stdin.readlines():
    x.append(int(line.strip()))

length = int(x[0])

del x[0]

max = -(10 ** 9)
min =  x[0]

for i in range(1, length):
    sa = x[i] - min

    if sa > max:
        max = sa

    if x[i] < min:
        min = x[i]
   
print max

Buggy python submission (verdict: Time Limit Exceeded):
import sys

x = []

for line in sys.stdin.readlines():
    x.append(int(line.strip()))

length = int(x[0])

del x[0]

max = -(10 ** 9)

for i in range(0, length - 1):
    for j in range(i + 1, length):
        sa = int(x[j]) - int(x[i])
        if max < sa:
            max = sa

print max

Fixed submission:
import sys

x = []

for line in sys.stdin.readlines():
    x.append(int(line.strip()))

length = int(x[0])

del x[0]

max = -(10 ** 9)
min =  x[0]

for i in range(1, length):
    sa = x[i] - min

    if sa > max:
        max = sa

    if x[i] < min:
        min = x[i]
   
print max
Buggy python submission (verdict: Runtime Error):
import sys

x = sys.argv[1]

x3 = x ** 3

print x3

Fixed submission:
import sys

x = sys.stdin.readline()

x3 = int(x) ** 3

print x3

Buggy python submission (verdict: Runtime Error):
import sys

x = sys.argv[1]

x3 = int(x) ** 3

print x3

Fixed submission:
import sys

x = sys.stdin.readline()

x3 = int(x) ** 3

print x3

Buggy python submission (verdict: Runtime Error):
import sys

x = sys.argv[1]

x3 = int(x) ** 3

print x3

Fixed submission:
import sys

x = sys.stdin.readline()

x3 = int(x) ** 3

print x3
Buggy python submission (verdict: Runtime Error):
import sys

line = sys.stdin.readline()

tate, yoko = line.split(" ")

S = tate * yoko
T = 2 * (tate + yoko)

print S, T

Fixed submission:
import sys

line = sys.stdin.readline()

tate, yoko = line.split(" ")

tate = int(tate)
yoko = int(yoko)

S = tate * yoko
T = 2 * (tate + yoko)

print '%d %d' % (S, T)

Buggy python submission (verdict: Runtime Error):
import sys

line = sys.stdin.readline()

tate, yoko = line.split(" ")

S = tate * yoko
T = 2 * (tate + yoko)

print S, " " T

Fixed submission:
import sys

line = sys.stdin.readline()

tate, yoko = line.split(" ")

tate = int(tate)
yoko = int(yoko)

S = tate * yoko
T = 2 * (tate + yoko)

print '%d %d' % (S, T)

Buggy python submission (verdict: Runtime Error):
import sys

line = sys.stdin.readline()

tate, yoko = line.split(" ")

S = tate * yoko
T = 2 * (tate + yoko)

print S, " ", T

Fixed submission:
import sys

line = sys.stdin.readline()

tate, yoko = line.split(" ")

tate = int(tate)
yoko = int(yoko)

S = tate * yoko
T = 2 * (tate + yoko)

print '%d %d' % (S, T)

Buggy python submission (verdict: Runtime Error):
import sys

line = sys.stdin.readline()

tate, yoko = line.split(" ")

tate = int(tate)
yoko = int(yoko)

S = tate * yoko
T = 2 * (tate + yoko)

print ('%d %d") % (S, T)

Fixed submission:
import sys

line = sys.stdin.readline()

tate, yoko = line.split(" ")

tate = int(tate)
yoko = int(yoko)

S = tate * yoko
T = 2 * (tate + yoko)

print '%d %d' % (S, T)
Buggy python submission (verdict: Runtime Error):
n = int(input())

r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_ min = min(r_min, r_t)

for _ in range(n-2):
    r_t = int(input())
    g_max  = max(g_max, r_t - r_min)
    r_min = min(r_min,r_t)
print(g_max)

Fixed submission:
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_min = min(r_t, r_min)

for _ in range(n - 2):
    r_t = int(input())
    g_max = max(g_max, r_t -r_min)
    r_min = min(r_t, r_min)
print(g_max)

Buggy python submission (verdict: Runtime Error):
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_ min = min(r_min, r_t)

for _ in range(n-2):
    r_t = int(input())
    g_max  = max(g_max, r_t - r_min)
    r_min = min(r_min, r_t)
print(g_max)

Fixed submission:
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_min = min(r_t, r_min)

for _ in range(n - 2):
    r_t = int(input())
    g_max = max(g_max, r_t -r_min)
    r_min = min(r_t, r_min)
print(g_max)

Buggy python submission (verdict: Runtime Error):
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_ min = min(r_min, r_t)

for _ in range(n-2):
    r_t = int(input())
    g_max  = max(g_max, r_t - r_min)
    r_min = min(r_min, r_t)

print(g_max)

Fixed submission:
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_min = min(r_t, r_min)

for _ in range(n - 2):
    r_t = int(input())
    g_max = max(g_max, r_t -r_min)
    r_min = min(r_t, r_min)
print(g_max)

Buggy python submission (verdict: Runtime Error):
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_ min = min(r_min, r_t)

for _ in range(n-2):
    r_t = int(input())
    g_max  = max(g_max, r_t - r_min)
    r_min = min(r_min, r_t)

print(g_max)

Fixed submission:
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_min = min(r_t, r_min)

for _ in range(n - 2):
    r_t = int(input())
    g_max = max(g_max, r_t -r_min)
    r_min = min(r_t, r_min)
print(g_max)

Buggy python submission (verdict: Runtime Error):
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_ min = min(r_min, r_t)

for _ in range(n-2):
    r_t = int(input())
    g_max  = max(g_max, r_t - r_min)
    r_min = min(r_min, r_t)

print(g_max)

Fixed submission:
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_min = min(r_t, r_min)

for _ in range(n - 2):
    r_t = int(input())
    g_max = max(g_max, r_t -r_min)
    r_min = min(r_t, r_min)
print(g_max)

Buggy python submission (verdict: Runtime Error):
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_ min = min(r_min, r_t)

for _ in range(n-2):
    r_t = int(input())
    g_max  = max(g_max, r_t - r_min)
    r_min = min(r_min, r_t)

print(g_max)

Fixed submission:
n = int(input())
r_min = int(input())
r_t = int(input())
g_max = r_t - r_min
r_min = min(r_t, r_min)

for _ in range(n - 2):
    r_t = int(input())
    g_max = max(g_max, r_t -r_min)
    r_min = min(r_t, r_min)
print(g_max)
Buggy python submission (verdict: Runtime Error):
from math import sqrt
x1, y1, x2, y2 = [int(i) for i in input().split(" ")]
print( "{:.6f}".format(sqrt( (x2 -x1) ** 2 + (y2 - y1) ** 2)))

Fixed submission:
from math import sqrt
x1, y1, x2, y2 = [float(i) for i in input().split(" ")]
print("{:.8f}".format(sqrt( (x2 -x1) ** 2 + (y2 - y1) ** 2)))

Buggy python submission (verdict: Runtime Error):
from math import sqrt
x1, y1, x2, y2 = [int(i) for i in input().split(" ")]
print( "{:.8f}".format(sqrt( (x2 -x1) ** 2 + (y2 - y1) ** 2)))

Fixed submission:
from math import sqrt
x1, y1, x2, y2 = [float(i) for i in input().split(" ")]
print("{:.8f}".format(sqrt( (x2 -x1) ** 2 + (y2 - y1) ** 2)))

Buggy python submission (verdict: Runtime Error):
from math import sqrt
x1, y1, x2, y2 = [int(i) for i in input().split(" ")]
print( int("{:.8f}".format(sqrt( (x2 -x1) ** 2 + (y2 - y1) ** 2))))

Fixed submission:
from math import sqrt
x1, y1, x2, y2 = [float(i) for i in input().split(" ")]
print("{:.8f}".format(sqrt( (x2 -x1) ** 2 + (y2 - y1) ** 2)))
Buggy python submission (verdict: Runtime Error):
n = int(input())
X = [int(i) for i in input().split(" ")]
Y = [int(i) for i in input().split(" ")]

#p = 1,2,3
for p in range(1, 4):
   print("{:.6f}".format(sum( [abs(a - b) ** p) for a, b in zip(X,Y) ] ) ** (1 / p) ) )

#p = infinity
print("{:.6f}".format(max( [ abs(a - b) for a, b in zip(X, Y) ] ) ) )
 

Fixed submission:
n = int(input())
X = [int(i) for i in input().split(" ")]
Y = [int(i) for i in input().split(" ")]

for p in range(1, 4):
    print("{:.6f}".format(sum( [abs(a - b) ** p for a, b in zip(X,Y) ] ) ** (1 / p) ) )

print("{:.6f}".format(max( [ abs(a - b) for a, b in zip(X, Y) ] ) ) )

Buggy python submission (verdict: Runtime Error):
n = int(input())
X = [int(i) for i in input().split(" ")]
Y = [int(i) for i in input().split(" ")]

for p in range(1, 4):
   print("{:.6f}".format(sum( [abs(a - b) ** p) for a, b in zip(X,Y) ] ) ** (1 / p) ) )

print("{:.6f}".format(max( [ abs(a - b) for a, b in zip(X, Y) ] ) ) )
 

Fixed submission:
n = int(input())
X = [int(i) for i in input().split(" ")]
Y = [int(i) for i in input().split(" ")]

for p in range(1, 4):
    print("{:.6f}".format(sum( [abs(a - b) ** p for a, b in zip(X,Y) ] ) ** (1 / p) ) )

print("{:.6f}".format(max( [ abs(a - b) for a, b in zip(X, Y) ] ) ) )

Buggy python submission (verdict: Runtime Error):
n = int(input())
X = [int(i) for i in input().split(" ")]
Y = [int(i) for i in input().split(" ")]

for p in range(1, 4):
    print("{:.6f}".format(sum( [abs(a - b) ** p) for a, b in zip(X,Y) ] ) ** (1 / p) ) )

print("{:.6f}".format(max( [ abs(a - b) for a, b in zip(X, Y) ] ) ) )
 

Fixed submission:
n = int(input())
X = [int(i) for i in input().split(" ")]
Y = [int(i) for i in input().split(" ")]

for p in range(1, 4):
    print("{:.6f}".format(sum( [abs(a - b) ** p for a, b in zip(X,Y) ] ) ** (1 / p) ) )

print("{:.6f}".format(max( [ abs(a - b) for a, b in zip(X, Y) ] ) ) )
Buggy python submission (verdict: Runtime Error):
print(x ** 3)

Fixed submission:
x = input()

print(x ** 3)

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

Fixed submission:
x = input()

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

print(2*a + 2* b, a*b)

Fixed submission:
nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)

Buggy python submission (verdict: Runtime Error):
a,b = input( , )

print(2*a+2*b,a*b)

Fixed submission:
nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)

Buggy python submission (verdict: Runtime Error):
def f(a b)
return a*b 2*a+ 2*b

Fixed submission:
nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)

Buggy python submission (verdict: Runtime Error):
a b = input()
print(a*b 2*(a+b))

Fixed submission:
nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)

Buggy python submission (verdict: Runtime Error):
a, b = input(,)
print(a*b,2*(a+b))

Fixed submission:
nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)

Buggy python submission (verdict: Runtime Error):
a,b = int(input())
print(a*b, 2*(a+b))

Fixed submission:
nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)

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

Fixed submission:
nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)
Buggy python submission (verdict: Runtime Error):
S = int(input())

h = int(S/360)
rest = S % 360
m = int(rest/60)
s = rest % m

print(h:m:s)

Fixed submission:
S = int(input())
h = S // 3600
m = (S % 3600) // 60
s = S % 60
print(h,m,s,sep = ":")

Buggy python submission (verdict: Runtime Error):
S = input()

h = S/360
rest = S % 360
m = rest/60
s = rest % 60

print(str(h) + ":" + str(m) + ":" + str(s))

Fixed submission:
S = int(input())
h = S // 3600
m = (S % 3600) // 60
s = S % 60
print(h,m,s,sep = ":")

Buggy python submission (verdict: Runtime Error):
S = int(input())
print(S / 360, (S % 360) / 60, S % 60, sep = ":" 

Fixed submission:
S = int(input())
h = S // 3600
m = (S % 3600) // 60
s = S % 60
print(h,m,s,sep = ":")
Buggy python submission (verdict: Runtime Error):
num = input().split(" ")
a = int(num[0])
b = int(num[1])

if a > b:
    print("a > b")
elif a < b:
    print("a > b)
else:
    print("a == b"))

Fixed submission:
num = input().split(" ")
a = int(num[0])
b = int(num[1])

if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")

Buggy python submission (verdict: Runtime Error):
num = input().split(" ")
a = int(num[0])
b = int(num[1])

if a > b:
    print("a > b")
elif a < b:
    print("a > b)
else:
    print("a == b")

Fixed submission:
num = input().split(" ")
a = int(num[0])
b = int(num[1])

if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")
Buggy python submission (verdict: Runtime Error):
num = input().split(" ")
n = [int(i) for i in num]
n = sorted(n)
print(" ".join(n))

Fixed submission:
num = input().split(" ")
n = [int(i) for i in num]
n = sorted(n)
print(n[0], n[1], n[2],sep = " ")
Buggy python submission (verdict: Runtime Error):
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)
    elif num1 == 0 and num2 == 0:
        break    
    

Fixed submission:
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
        break
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)

Buggy python submission (verdict: Runtime Error):
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)
    elif num1 == 0 and num2 == 0:
        break    
    

Fixed submission:
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
        break
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)

Buggy python submission (verdict: Runtime Error):
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1) 
    

Fixed submission:
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
        break
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)

Buggy python submission (verdict: Runtime Error):
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1) 
    

Fixed submission:
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
        break
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)
Buggy python submission (verdict: Runtime Error):
num = [int(n) for n in input().split(" ")]

a = num[1]
b = num[2]
c = num[3]

count = 0
for i in range(a, b+1):
    if c % i == 0:
        count += 1
        

Fixed submission:
num = [int(n) for n in input().split(" ")]

a = num[0]
b = num[1]
c = num[2]

count = 0
for i in range(a, b+1):
    if c % i == 0:
        count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
num = [int(n) for n in input().split(" ")]

a = num[1]
b = num[2]
c = num[3]

count = 0
for i in range(a, b+1):
    if c % i == 0:
        count += 1
print(count)
        

Fixed submission:
num = [int(n) for n in input().split(" ")]

a = num[0]
b = num[1]
c = num[2]

count = 0
for i in range(a, b+1):
    if c % i == 0:
        count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
from math import pi

r = int(input())

print(r ** 2 * pi, 2 * r * pi) 

Fixed submission:
from math import pi

r = float(input())

s = "{:.6f}".format(r ** 2 * pi) 
l = "{:.6f}".format(r * 2 * pi)

print(s, l)
Buggy python submission (verdict: Runtime Error):
while True:
    num = [int(i) for i in input().split(" ")]
    H = num[0]
    W = [1]
    if W == H == 0:
        break
    print("#" * W, end = "\n")
    print( ( ("#" + "." * (W - 2) + "#" ) + "\n") * (H -2) )
    print("#" * W)

Fixed submission:
while True:
    H, W = [int(x) for x in input().split(" ")]
    if H == W == 0:
        break
    for i in range(H):
        if i == 0 or i == (H - 1):
            print("#" * W)
        else:
            print("#" + "." * (W - 2) + "#")
    print("")
Buggy python submission (verdict: Runtime Error):
count = int(input())
array = [int(i) for i in input().split(" ")]

a = array.reverse()
print(" ".join(a))

Fixed submission:
count = int(input())
array = [int(i) for i in input().split(" ")]

for n in range( count - 1, 0, -1):
    print(array[n], end = " ")
print(array[0])
Buggy python submission (verdict: Runtime Error):
n = int(input())
cards = [s + " " + str(i) for i in range(1,14)] for s in ["S","H","C","D"]
for _ in range(n):
    suit, num = input().split(" ")
    if suit == "S":
        cards[0][int(num) - 1] = 0
    elif suit == "H":
        cards[1][int(num) - 1] = 0
    elif suit == "C":
        cards[2][int(num) - 1] = 0
    elif suit == "D":
        cards[3][int(num) - 1] = 0
for s in cards:
    for i in s:
        if i != 0:
            print(i)

Fixed submission:
n = int(input())
cards =[ [s + " " + str(i) for i in range(1,14)] for s in ["S","H","C","D"]]
for _ in range(n):
    suit, num = input().split(" ")
    if suit == "S":
        cards[0][int(num) - 1] = 0
    elif suit == "H":
        cards[1][int(num) - 1] = 0
    elif suit == "C":
        cards[2][int(num) - 1] = 0
    elif suit == "D":
        cards[3][int(num) - 1] = 0
for s in cards:
    for i in s:
        if i != 0:
            print(i)

Buggy python submission (verdict: Runtime Error):
n = int(input())
cards = [s + " " + str(i) for i in range(1,14)] for s in ["S","H","C","D"]]
for _ in range(n):
    suit, num = input().split(" ")
    if suit == "S":
        cards[0][int(num) - 1] = 0
    elif suit == "H":
        cards[1][int(num) - 1] = 0
    elif suit == "C":
        cards[2][int(num) - 1] = 0
    elif suit == "D":
        cards[3][int(num) - 1] = 0
for s in cards:
    for i in s:
        if i != 0:
            print(i)

Fixed submission:
n = int(input())
cards =[ [s + " " + str(i) for i in range(1,14)] for s in ["S","H","C","D"]]
for _ in range(n):
    suit, num = input().split(" ")
    if suit == "S":
        cards[0][int(num) - 1] = 0
    elif suit == "H":
        cards[1][int(num) - 1] = 0
    elif suit == "C":
        cards[2][int(num) - 1] = 0
    elif suit == "D":
        cards[3][int(num) - 1] = 0
for s in cards:
    for i in s:
        if i != 0:
            print(i)
Buggy python submission (verdict: Runtime Error):
m, n = [int (input().split(" ")]

a =[ [int(i) for i in input().split(" ")] for _ in range(n) ]
b =[]
for i in range(m):
    b.append( int(input()) )


for x in range(n):
    result = 0
    for y in range(m):
        result += a[x][y] * b[y]
    print(result)
    

Fixed submission:
n, m = [int(i) for i in input().split(" ")]

a =[ [int(i) for i in input().split(" ")] for _ in range(n) ]
b =[]
for i in range(m):
    b.append( int(input()) )


for x in range(n):
    result = 0
    for y in range(m):
        result += a[x][y] * b[y]
    print(result)

Buggy python submission (verdict: Runtime Error):
n, m = [int (input().split(" ")]

a =[ [int(i) for i in input().split(" ")] for _ in range(n) ]
b =[]
for i in range(m):
    b.append( int(input()) )


for x in range(n):
    result = 0
    for y in range(m):
        result += a[x][y] * b[y]
    print(result)
    

Fixed submission:
n, m = [int(i) for i in input().split(" ")]

a =[ [int(i) for i in input().split(" ")] for _ in range(n) ]
b =[]
for i in range(m):
    b.append( int(input()) )


for x in range(n):
    result = 0
    for y in range(m):
        result += a[x][y] * b[y]
    print(result)

Buggy python submission (verdict: Runtime Error):
n, m = [int (input().split(" ")]

a =[ [int(i) for i in input().split(" ")] for _ in range(n) ]
b =[]
for i in range(m):
    b.append( int(input()) )


for x in range(n):
    result = 0
    for y in range(m):
        result += a[x][y] * b[y]
    print(result)
    

Fixed submission:
n, m = [int(i) for i in input().split(" ")]

a =[ [int(i) for i in input().split(" ")] for _ in range(n) ]
b =[]
for i in range(m):
    b.append( int(input()) )


for x in range(n):
    result = 0
    for y in range(m):
        result += a[x][y] * b[y]
    print(result)
Buggy python submission (verdict: Runtime Error):
r, c = [int(i) for i in input().split(" ")]
s_row = [0 for x in range(c + 1)]

for i in range(r):
    row = [int(n) for n in input().split(" ")]
    row.append(sum(raw))
    print(" ".join( [ str(s) for s in row ] ) )
    s_row = [ x + y for x, y in zip(s_row, row)]
print(" ".join( [str(s1) for s1 in s_row] ))

Fixed submission:
r, c = [int(i) for i in input().split(" ")]
s_row = [0 for x in range(c + 1)]

for i in range(r):
    row = [int(n) for n in input().split(" ")]
    row.append(sum(row))
    print(" ".join( [ str(s) for s in row ] ) )
    s_row = [ x + y for x, y in zip(s_row, row)]
print(" ".join( [str(s1) for s1 in s_row] ))

Buggy python submission (verdict: Runtime Error):
r, c = [int(i) for i in input().split(" ")]
s_row = [0 for x in range(c + 1)]

for i in range(r):
    row = [int(n) for n in input().split(" ")]
   row =  row.append(sum(row))
    print(" ".join( [ str(s) for s in row ] ) )
    s_row = [ x + y for x, y in zip(s_row, row)]
print(" ".join( [str(s1) for s1 in s_row] ))

Fixed submission:
r, c = [int(i) for i in input().split(" ")]
s_row = [0 for x in range(c + 1)]

for i in range(r):
    row = [int(n) for n in input().split(" ")]
    row.append(sum(row))
    print(" ".join( [ str(s) for s in row ] ) )
    s_row = [ x + y for x, y in zip(s_row, row)]
print(" ".join( [str(s1) for s1 in s_row] ))