Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from operator import itemgetter

def eratosthenes(n):
    table = [True] * (n + 1)
    table[0] = table[1] = True
    for i in range(2, int(round(pow(n, 0.5)))):
        if not table[i]:
            continue
        for j in range(i + i, n, i):
            table[j] = False
    return table

if __name__ == "__main__":
    N = int(input())
    f = itemgetter(*[int(input()) for _ in range(N)])
    print(sum(f(eratosthenes(10000))))

Fixed submission:
from random import randrange


def eratosthenes(size):
    table = [True] * (size + 1)
    table[0] = table[1] = True
    for i in range(2, int(round(pow(size+1, 0.5)))):
        if not table[i]:
            continue
        for j in range(i + i, size+1, i):
            table[j] = False
    return table


def miller_rabin(n, k=20):
    if n == 2:
        return True
    if n == 1 or n % 2 == 0:
        return False
    d = n - 1
    while d & 1 == 0:
        d >>= 1
    for _ in range(k):
        a = randrange(1, n)
        y = pow(a, d, n)
        t = d
        while t != n - 1 and y != 1 and y != n - 1:
            y = pow(y, 2, n)
            t <<= 1
        if y != n - 1 and (t & 1) == 0:
            return False
    return True

if __name__ == "__main__":
    N = int(input())
    print(sum(map(miller_rabin, [int(input()) for _ in range(N)])))

Buggy python submission (verdict: Runtime Error):
from operator import itemgetter

def eratosthenes(n):
    table = [True] * (n + 1)
    table[0] = table[1] = True
    for i in range(2, int(round(pow(n, 0.5)))):
        if not table[i]:
            continue
        for j in range(i + i, n, i):
            table[j] = False
    return table

if __name__ == "__main__":
    N = int(input())
    f = itemgetter(*[int(input()) for _ in range(N)])
    print(sum(f(eratosthenes(100000))))

Fixed submission:
from random import randrange


def eratosthenes(size):
    table = [True] * (size + 1)
    table[0] = table[1] = True
    for i in range(2, int(round(pow(size+1, 0.5)))):
        if not table[i]:
            continue
        for j in range(i + i, size+1, i):
            table[j] = False
    return table


def miller_rabin(n, k=20):
    if n == 2:
        return True
    if n == 1 or n % 2 == 0:
        return False
    d = n - 1
    while d & 1 == 0:
        d >>= 1
    for _ in range(k):
        a = randrange(1, n)
        y = pow(a, d, n)
        t = d
        while t != n - 1 and y != 1 and y != n - 1:
            y = pow(y, 2, n)
            t <<= 1
        if y != n - 1 and (t & 1) == 0:
            return False
    return True

if __name__ == "__main__":
    N = int(input())
    print(sum(map(miller_rabin, [int(input()) for _ in range(N)])))
Buggy python submission (verdict: Runtime Error):
input()
print(" ".join.(input().split()[::-1])

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

Buggy python submission (verdict: Runtime Error):
input()
print(" ".join(input().split()[::-1])

Fixed submission:
input()
print(" ".join(input().split()[::-1]))
Buggy python submission (verdict: Runtime Error):
lis = []
for i in xrange(10):
 lis.append(input())
for a in sorted(lis,reversed=True)[:3]:
 print a

Fixed submission:
lis = []
for i in xrange(10):
 lis.append(input())
for a in sorted(lis,reverse=True)[:3]:
 print a
Buggy python submission (verdict: Runtime Error):
import sys

T = input()
for i in range(0,T):
    K,P = raw_input().split(' ')
    K = int(K)
    P = int(P)
    print ( K % P - 1 + P ) % P + 1

Fixed submission:
import sys

T = input()
for i in range(0,T):
    K,P = raw_input().split(' ')
    K = int(K)
    P = int(P)
    print ( K % P - 1 + P ) % P + 1
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input())
print((a+b)//2)

Fixed submission:
a,b = map(int,input().split())
print((a+b)//2)
Buggy python submission (verdict: Runtime Error):
import itertools

n = int(input())
a = [input() for _ in range(n)]

suits = ['S', 'H', 'C', 'D']
cards = ["%s %d" % (s, r) for s, r in suits, range(1, 14)]
answers = [c for c in cards if c not in a]
for card in answers:
    print(card)



Fixed submission:
import itertools

n = int(input())
a = [input() for _ in range(n)]

suits = ['S', 'H', 'C', 'D']
cards = ["%s %d" % (s, r) for s, r in itertools.product(suits, range(1, 14))]
answers = [c for c in cards if c not in a]
for card in answers:
    print(card)
Buggy python submission (verdict: Runtime Error):
while 1:
  n,m,q=map(int,input().split())
  if (n|m|q)==0: break
  
  p=[]
  res=[[_ for _ in range(n)] for _ in range(m)]
  for i in range(q):
    s,b=[[int(c) for c in s] for s in input().split()]
    if i>0:
      for j in range(n):
        s[j]^=p[j]
    for j in range(n):
      for k in range(m):
        if s[j]!=b[k] and j in res[k]:
          res[k].remove(j)
    p=s
  
  table="".join([str(i) for i in range(10)]+[chr(ord("A")+i) for i in range(26)])
  for i in range(m):
    if len(res[i])==1:
      print(table[res[i][0]],sep="",end="")
    else:
      print("?",sep="",end="")
  print()

Fixed submission:
while 1:
  n,m,q=map(int,input().split())
  if (n|m|q)==0: break
  
  p=[]
  res=[{_ for _ in range(n)} for _ in range(m)]
  for i in range(q):
    s,b=[[int(c) for c in s] for s in input().split()]
    if i>0:
      for j in range(n):
        s[j]^=p[j]
    zero={i for i in range(n) if s[i]==0}
    one={i for i in range(n) if s[i]==1}
    for j in range(m):
      if(b[j]==0): res[j]-=one
      if(b[j]==1): res[j]-=zero
    p=s
  
  table="".join([str(i) for i in range(10)]+[chr(ord("A")+i) for i in range(26)])
  for i in range(m):
    if len(res[i])==1:
      print(table[res[i].pop()],sep="",end="")
    else:
      print("?",sep="",end="")
  print()
Buggy python submission (verdict: Runtime Error):
code="""
#include <iostream>
using namespace std;
int main()
{
  int x; cin>>x;
  cout<<x*x*x<<endl;
}
"""

import os,tempfile
(_,filename)=tempfile.mkstemp(".cpp")

f=open(filename,"w")
f.write(code)
f.close()

os.system("g++ -std=c++11 {} -o a.out".format(filename))
os.system("./a.out")

Fixed submission:
code="""
#include <iostream>
using namespace std;
int main()
{
  int x; cin>>x;
  cout<<x*x*x<<endl;
}
"""

import os,tempfile
(_,filename)=tempfile.mkstemp(".cpp")

f=open(filename,"w")
f.write(code)
f.close()

os.system("g++ -std=c++0x {} -o ./a.out".format(filename))
os.system("./a.out")

Buggy python submission (verdict: Runtime Error):
code="""
using System;
using System.Numerics;
class Test{
  static void Main(){
    BigInteger x=BigInteger.Parse(Console.ReadLine());
    Console.WriteLine(x*x*x);
  }
}
"""

import os,tempfile
(_,filename)=tempfile.mkstemp()

f=open(filename,"w")
f.write(code)
f.close()

os.system("dmcs {} -r:System.Numerics -out:a.exe".format(filename))
os.system("./a.exe")

Fixed submission:
code="""
#include <iostream>
using namespace std;
int main()
{
  int x; cin>>x;
  cout<<x*x*x<<endl;
}
"""

import os,tempfile
(_,filename)=tempfile.mkstemp(".cpp")

f=open(filename,"w")
f.write(code)
f.close()

os.system("g++ -std=c++0x {} -o ./a.out".format(filename))
os.system("./a.out")

Buggy python submission (verdict: Runtime Error):
code="""
#include <iostream>
using namespace std;
int main()
{
  int x; cin>>x;
  cout<<x*x*x<<endl;
}
"""

import os,tempfile
(_,filename)=tempfile.mkstemp(".cpp")

f=open(filename,"w")
f.write(code)
f.close()

os.system("g++ -std=c++11 {} -o ./a.out".format(filename))
os.system("./a.out")

Fixed submission:
code="""
#include <iostream>
using namespace std;
int main()
{
  int x; cin>>x;
  cout<<x*x*x<<endl;
}
"""

import os,tempfile
(_,filename)=tempfile.mkstemp(".cpp")

f=open(filename,"w")
f.write(code)
f.close()

os.system("g++ -std=c++0x {} -o ./a.out".format(filename))
os.system("./a.out")
Buggy python submission (verdict: Runtime Error):
def kaijou(n):
	res=1
	for i in xrange(1,x+1):
		res*=i
	return res

def comb(a,b):
	if(a<b or b<0):return 0
	if(b==0):return 1
	return kaijou(a)/kaijou(b)/kaijou(a-b)

a,b,c=map(int,raw_input().split())
c-=a*b
print comb(c+a-1,c)

Fixed submission:
def kaijou(n):
	res=1
	for i in xrange(1,n+1):
		res*=i
	return res

def comb(a,b):
	if(a<b or b<0):return 0
	if(b==0):return 1
	return kaijou(a)/kaijou(b)/kaijou(a-b)

a,b,c=map(int,raw_input().split())
c-=a*b
print comb(c+a-1,c)
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
d = ""
for i in range(n):
    p,q = map(str,raw_input().split())
    if p == "insert":
        d = Insert(d,q)
    elif p == "find":
        rst = Find(d,q)
        print rst

def Insert(d,v):
    d += v
    return d

def Find(d,v):
    r = d.find(v)
    if(r >= 0):
        return "yes"
    else:
        return "no"

Fixed submission:
n = int(raw_input())
d = set()
for i in range(n):
    p,q = map(str,raw_input().split())
    if p == "insert":
        d.add(q)
    elif p == "find":
        if(q in d):
            print "yes"
        else:
            print "no"

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
d = ""
for i in range(n):
    p,q = map(str,raw_input().split())
    if p == "insert":
        d += q
    elif p == "find":
        r = d.find(q)
        if(r >= 0):
            return "yes"
        else:
            return "no"

Fixed submission:
n = int(raw_input())
d = set()
for i in range(n):
    p,q = map(str,raw_input().split())
    if p == "insert":
        d.add(q)
    elif p == "find":
        if(q in d):
            print "yes"
        else:
            print "no"
Buggy python submission (verdict: Runtime Error):
i=1
j=1
while i<10:
    j=1
    while j<10:
                print i,'x',j,'=',i*j,"\n"
                j=j+1

    i=i+1

Fixed submission:
x = range(1,10)
for i in x:
  for j in x:
    print u"%dx%d=%d"%(i, j, i*j)

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

Fixed submission:
x = range(1,10)
for i in x:
  for j in x:
    print u"%dx%d=%d"%(i, j, i*j)

Buggy python submission (verdict: Time Limit Exceeded):
i=1
j=1
while i<10:
        j=1
        while j<10:
                print i,"x",j,"=",i*j

Fixed submission:
x = range(1,10)
for i in x:
  for j in x:
    print u"%dx%d=%d"%(i, j, i*j)
Buggy python submission (verdict: Runtime Error):
i=gets
i=i.to_i
print i*i*i,"\n"

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

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

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

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

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

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

Fixed submission:
x = input()
y = int(x)**3
print(y)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
import sys

num_list = []
diff = -sys.maxsize -1
for i in range(int(input())):
    num_list.append(int(input()))

for (idx, Rt) in enumerate(num_list):
    if(idx+1 == len(num_list)-1):
        tmp = num_list[idx+1] - Rt
        if (tmp > diff):
            diff = tmp
    else:
        for Rj in num_list[idx+1:]:
            tmp = Rj - Rt
            if(tmp > diff):
                diff = tmp

print(diff)


Fixed submission:
import sys

max_diff = -sys.maxsize - 1
for idx in range(int(input())):
    Rt = int(input())
    if(idx):
        tmp = Rt - min_num
        if(tmp > max_diff):
            max_diff = tmp
        if(Rt < min_num):
            min_num = Rt
    else:
        min_num = Rt
print(max_diff)
Buggy python submission (verdict: Runtime Error):
x = input()

Pow = x*x*x

print ("Pow")

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

x = int(input())

print(x*x*x)

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

Pow = x*x*x

print (Pow)

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

x = int(input())

print(x*x*x)
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import math
r = int(input())
print("{0:f} {1:f}".format(r*r*math.pi,2*r*math.pi))

Fixed submission:
# -*- coding:utf-8 -*-
import math
r = float(input())
print("{0:f} {1:f}".format(r*r*math.pi,2*r*math.pi))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n,m,l = [int(i)for i in input().split(' ')]
A = []
B = []
C = [[0for _ in range(n)]for _ in range(l)]
for i in range(n):
    A.append([int(a)for a in input().split(' ')])
for i in range(m):
    B.append([int(a)for a in input().split(' ')])

for i in range(n):
    for j in range(l):
        s = 0
        for k in range(m):
            s += A[i][k]*B[k][j]
        C[i][j] = s

for x in range(l):
    print(' '.join([str(a)for a in C[x]]))

Fixed submission:
# -*- coding: utf-8 -*-
n,m,l = [int(i)for i in input().split(' ')]
A = []
B = []
C = [[0for _ in range(l)]for _ in range(n)]
for i in range(n):
    A.append([int(a)for a in input().split(' ')])
for i in range(m):
    B.append([int(a)for a in input().split(' ')])

for i in range(n):
    for j in range(l):
        s = 0
        for k in range(m):
            s += A[i][k]*B[k][j]
        C[i][j] = s

for x in range(n):
    print(' '.join([str(a)for a in C[x]]))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n,m,l = [int(i)for i in input().split(' ')]
A = []
B = []
C = [[0for _ in range(n)]for _ in range(l)]
for i in range(n):
    A.append([int(a)for a in input().split(' ')])
for i in range(m):
    B.append([int(a)for a in input().split(' ')])

for i in range(n):
    for j in range(l):
        s = 0
        for k in range(m):
            s += A[i][k]*B[k][j]
        C[i][j] = s

for x in range(n):
    print(' '.join([str(a)for a in C[x]]))

Fixed submission:
# -*- coding: utf-8 -*-
n,m,l = [int(i)for i in input().split(' ')]
A = []
B = []
C = [[0for _ in range(l)]for _ in range(n)]
for i in range(n):
    A.append([int(a)for a in input().split(' ')])
for i in range(m):
    B.append([int(a)for a in input().split(' ')])

for i in range(n):
    for j in range(l):
        s = 0
        for k in range(m):
            s += A[i][k]*B[k][j]
        C[i][j] = s

for x in range(n):
    print(' '.join([str(a)for a in C[x]]))
Buggy python submission (verdict: Runtime Error):
from math import sqrt
x1, y1, x2, y2 = (int(i) for i in input().split())
d = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
print(d)

Fixed submission:
from math import sqrt
x1, y1, x2, y2 = (float(i) for i in input().split())
d = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
print(d)
Buggy python submission (verdict: Runtime Error):
import math

n = int(input())

for i in range(0, n):
    a = int(input())
    b = int(input())
    if math.log10(a + b) + 1 > 80:
        print("overflow")
    else :
        print(a + b)

Fixed submission:
n = int(input())

for i in range(0, n):
    a = int(input())
    b = int(input())
    if len(str(a + b)) > 80:
        print("overflow")
    elif len(str(a)) > 80:
        print("overflow")
    elif len(str(b)) > 80:
        print("overflow")
    else :
        print(a + b)

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

n = int(input())

for i in range(0, n):
    a = int(input())
    b = int(input())
    if int(math.log10(a + b)) + 1 > 80:
        print("overflow")
    else :
        print(a + b)

Fixed submission:
n = int(input())

for i in range(0, n):
    a = int(input())
    b = int(input())
    if len(str(a + b)) > 80:
        print("overflow")
    elif len(str(a)) > 80:
        print("overflow")
    elif len(str(b)) > 80:
        print("overflow")
    else :
        print(a + b)

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

n = int(input())

for i in range(0, n) :
    a = int(input())
    b = int(input())
    if math.log10(a + b) + 1 > 80 :
        print("overflow")
    elif math.log10(a) + 1 > 80 :
        print("overflow")
    elif math.log10(b) + 1 > 80 :
        print("overflow")
    else :
        print(a + b)

Fixed submission:
n = int(input())

for i in range(0, n):
    a = int(input())
    b = int(input())
    if len(str(a + b)) > 80:
        print("overflow")
    elif len(str(a)) > 80:
        print("overflow")
    elif len(str(b)) > 80:
        print("overflow")
    else :
        print(a + b)

Buggy python submission (verdict: Runtime Error):
n = int(input())

for i in range(0, n):
    a = int(input())
    b = int(input())
    if len(str(a + b)) >= 80
        print("overflow")
    elif len(str(a)) >= 80:
        print("overflow")
    elif len(str(b)) >= 80
        print("overflow")
    else :
        print(a + b)

Fixed submission:
n = int(input())

for i in range(0, n):
    a = int(input())
    b = int(input())
    if len(str(a + b)) > 80:
        print("overflow")
    elif len(str(a)) > 80:
        print("overflow")
    elif len(str(b)) > 80:
        print("overflow")
    else :
        print(a + b)

Buggy python submission (verdict: Runtime Error):
n = int(input())

for i in range(0, n):
    a = int(input())
    b = int(input())
    if len(str(a + b)) > 80
        print("overflow")
    elif len(str(a)) > 80:
        print("overflow")
    elif len(str(b)) > 80
        print("overflow")
    else :
        print(a + b)

Fixed submission:
n = int(input())

for i in range(0, n):
    a = int(input())
    b = int(input())
    if len(str(a + b)) > 80:
        print("overflow")
    elif len(str(a)) > 80:
        print("overflow")
    elif len(str(b)) > 80:
        print("overflow")
    else :
        print(a + b)
Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n = input()
    if n == "0000":
        break

    if n.count(n[0]) == 4:
        print("NA")
        continue

    cnt = 0
    while n != "6174":
        L, S = list(n), list(n)
        L.sort(reverse=True)
        S.sort()
        n = str(int("".join(L)) - int("".join(S)))
        cnt += 1

    print(cnt)

Fixed submission:
while True:
    n = input()
    if n == "0000":
        break

    if n.count(n[0]) == 4:
        print("NA")
        continue

    cnt = 0
    while n != "6174":
        L, S = list(n), list(n)
        L.sort(reverse=True)
        S.sort()
        n = str(int("".join(L)) - int("".join(S))).zfill(4)
        cnt += 1

    print(cnt)
Buggy python submission (verdict: Runtime Error):
#coding: UTF-8

for i in range(1,10):
    for j in range(1,10):
        print(i + "*" + j + "=" + i*j)

Fixed submission:
#coding: UTF-8

for i in range(1,10):
    for j in range(1,10):
        print str(i) + 'x' + str(j) + '=' + str(i*j)
Buggy python submission (verdict: Runtime Error):
ans = ['A','B','C','D','E','F','G']
def get(x):
    for i in range(8):
        for j in range(8):
            if i < 7 and j < 7:
                if x[i][j]=='1' and x[i+1][j]=='1' and x[i][j+1]=='1' and x[i+1][j+1]=='1':
                    return 0
            if i<5:
                if x[i][j]=='1' and x[i+1][j]=='1' and x[i+2][j]=='1' and x[i+3][j]=='1':
                    return 1
            if j<5:
                if x[i][j]=='1' and x[i][j+1]=='1' and x[i][j+2]=='1' and x[i][j+3]=='1':
                    return 2
            if i<6 and 0<j:
                if x[i][j]=='1' and x[i+1][j]=='1' and x[i+1][j-1]=='1' and x[i+2][j-1]=='1':
                    return 3
            if i<7 and j<6:
                if x[i][j]=='1' and x[i][j+1]=='1' and x[i+1][j+1]=='1' and x[i+1][j+2]=='1':
                    return 4
            if i<6 and j<7:
                if x[i][j]=='1' and x[i+1][j]=='1' and x[i+1][j+1]=='1' and x[i+2][j+1]=='1':
                    return 5
            if i<7 and 0<j<7:
                if x[i][j]=='1' and x[i][j+1]=='1' and x[i+1][j]=='1' and x[i+1][j-1]=='1':
                    return 6
while 1:
    l = []
    for i in range(8):
        l.append(raw_input())
    print ans[get(l)]
    raw_input()

Fixed submission:
ans = ['A','B','C','D','E','F','G']
def get(x):
    for i in range(8):
        for j in range(8):
            if i < 7 and j < 7:
                if x[i][j]=='1' and x[i+1][j]=='1' and x[i][j+1]=='1' and x[i+1][j+1]=='1':
                    return 0
            if i<5:
                if x[i][j]=='1' and x[i+1][j]=='1' and x[i+2][j]=='1' and x[i+3][j]=='1':
                    return 1
            if j<5:
                if x[i][j]=='1' and x[i][j+1]=='1' and x[i][j+2]=='1' and x[i][j+3]=='1':
                    return 2
            if i<6 and 0<j:
                if x[i][j]=='1' and x[i+1][j]=='1' and x[i+1][j-1]=='1' and x[i+2][j-1]=='1':
                    return 3
            if i<7 and j<6:
                if x[i][j]=='1' and x[i][j+1]=='1' and x[i+1][j+1]=='1' and x[i+1][j+2]=='1':
                    return 4
            if i<6 and j<7:
                if x[i][j]=='1' and x[i+1][j]=='1' and x[i+1][j+1]=='1' and x[i+2][j+1]=='1':
                    return 5
            if i<7 and 0<j<7:
                if x[i][j]=='1' and x[i][j+1]=='1' and x[i+1][j]=='1' and x[i+1][j-1]=='1':
                    return 6
while 1:
    try:
        l = []
        for i in range(8):
            l.append(raw_input())
        print ans[get(l)]
        raw_input()
    except: break
Buggy python submission (verdict: Runtime Error):
count = 0
while 1:
    a = raw_input()
    b = a[::-1]
    if a == b: count+=1
    print count

    

Fixed submission:
count = 0
try:
    while 1:
        a = raw_input()
        b = a[::-1]
        if a == b: count+=1
except EOFError: pass
print count
Buggy python submission (verdict: Runtime Error):
line = False
while True:
    a,b = map(int, raw_input().split())
    if line: print ""
    line = True
    count = 0
    for i in range(a, b+1):
        if (i % 4 == 0 and i % 100 != 0) or i % 400 == 0:
            print i
            count += 1
    if count == 0: print "NA"

Fixed submission:
line = False
while 1:
    a,b = map(int, raw_input().split())
    if a == b == 0: break
    if line: print
    line = True
    count = 0
    for i in range(a, b+1):
        if (i % 4 == 0 and i % 100 != 0) or (i % 400 == 0):
            print i
            count += 1
    if count == 0: print "NA"
Buggy python submission (verdict: Runtime Error):
a,b = map(int, raw_input().split)
gA = []
gb = []
for i in range(a):
    gA.append(map(int, raw_input().split()))
for i in range(b):
    gb.append(input())
for i in range(a):
    ans = 0
    for j in range(b):
        ans += gA[i][j] * gb[j]
    print ans

Fixed submission:
m,n = map(int, raw_input().split())
a = []
b = []
for i in range(m):
    a.append(map(int, raw_input().split()))
for i in range(n):
    b.append(input())
for i in range(m):
    ans = 0
    for j in range(n):
        ans += a[i][j] * b[j]
    print ans
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
>>> import time
>>> time.sleep(1)
if(a>=0):
    print ((b-a)*e);
else:
    print(a*-c+d+b*e);

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
if(a>=0):
    print ((b-a)*e);
else:
    print(a*-c+d+b*e);
Buggy python submission (verdict: Runtime Error):
height = map(int, raw_input().split())

height.sort()

for i in range(3):
  print height[9-i]

Fixed submission:
s = []
for i in xrange(10):
	s.append(int(raw_input()))
s.sort()
s.reverse()
for i in xrange(3):
	print s[i]