ZhenlongDai/ACPR huggingface dataset:
Problem: p03027
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
N = int(input())

g = 1000003

fr = [1] * g
for x in range(2, g):
    fr[x] = x * fr[x-1] % g

def div(a, b):
    return a * pow(b, g-2, g) % g

for x, d, n in (map(int, input().split()) for _ in range(N)):
    ans = 1

    if d == 0:
        print(pow(x, d, g))

    else:
        s = div(x, d)
        x, y = s+n-1, s-1
        if y >= 0 and x < g :
            print(div(fr[x], fr[y]) * pow(d, n, g) % g)
        else:
            print(0)

Failing test case input:
2
23 0 5
8593 376063 2019

Expected output:
436325
829032


Actual output:
1
829032


Fixed submission (verdict: Accepted):
import math
N = int(input())

g = 1000003

fr = [1] * g
for x in range(2, g):
    fr[x] = x * fr[x-1] % g

def div(a, b):
    return a * pow(b, g-2, g) % g

for x, d, n in (map(int, input().split()) for _ in range(N)):
    ans = 1

    if d == 0:
        print(pow(x, n, g))

    else:
        s = div(x, d)
        x, y = s+n-1, s-1
        if s+n-1 < g :
            print(div(fr[x], fr[y]) * pow(d, n, g) % g)
        else:
            print(0)

Problem: p03027
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
N = int(input())

g = 1000003

fr = [1] * g
for x in range(2, g):
    fr[x] = x * fr[x-1] % g

def div(a, b):
    return a * pow(b, g-2, g) % g

for x, d, n in (map(int, input().split()) for _ in range(N)):
    ans = 1

    if d == 0:
        print(pow(x, d, g))

    else:
        s = div(x, d)
        x, y = s+n-1, s-1
        if s%g != 0 and s%g+n-1 < g :
            print(div(fr[x], fr[y]) * pow(d, n, g) % g)
        else:
            print(0)

Failing test case input:
2
23 0 5
23772 376063 2019

Expected output:
436325
755257


Actual output:
1
755257


Fixed submission (verdict: Accepted):
import math
N = int(input())

g = 1000003

fr = [1] * g
for x in range(2, g):
    fr[x] = x * fr[x-1] % g

def div(a, b):
    return a * pow(b, g-2, g) % g

for x, d, n in (map(int, input().split()) for _ in range(N)):
    ans = 1

    if d == 0:
        print(pow(x, n, g))

    else:
        s = div(x, d)
        x, y = s+n-1, s-1
        if s+n-1 < g :
            print(div(fr[x], fr[y]) * pow(d, n, g) % g)
        else:
            print(0)
Problem: p03027
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
N = int(input())

g = 1000003

fr = [1] * g
for x in range(2, g):
    fr[x] = x * fr[x-1] % g

def div(a, b):
    return a * pow(b, g-2, g)

for x, d, n in (map(int, input().split()) for _ in range(N)):
    ans = 1

    if d == 0:
        print(pow(x, d, g))

    else:
        s = div(x, d)
        x, y = (s+n-1)%g, (s-1)%g
        if x >= y:
            print(div(fr[x], fr[y]) * pow(d, n, g) % g)
        else:
            print(0)

Failing test case input:
2
7 0 1
154 17991 2755

Expected output:
7
712757


Actual output:
1
712757


Fixed submission (verdict: Accepted):
import math
N = int(input())

g = 1000003

fr = [1] * g
for x in range(2, g):
    fr[x] = x * fr[x-1] % g

def div(a, b):
    return a * pow(b, g-2, g) % g

for x, d, n in (map(int, input().split()) for _ in range(N)):
    ans = 1

    if d == 0:
        print(pow(x, n, g))

    else:
        s = div(x, d)
        x, y = s+n-1, s-1
        if s+n-1 < g :
            print(div(fr[x], fr[y]) * pow(d, n, g) % g)
        else:
            print(0)
Problem: p03682
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=sorted([[i]+list(map(int,input().split()))for i in range(n)],key=lambda x:x[1])
s=[]
for i in range(n-1):
    s.append((a[i+1][1]-a[i][1],a[i][0],a[i+1][0]))
a=sorted(a,key=lambda x:x[2])
for i in range(n-1):
    s.append((a[i+1][2]-a[i][2],a[i][0],a[i+1][0]))
s.sort()
t=[i for i in range(n)]
def f(x):
    if x==t[x]:
        return x
    t[x]=f(t[x])
    return t[x]
c=0
for i,j,h in s:
    j,h=f(j),f(h)
    if i!=j:
        t[j]=h
        c+=i
print(c)

Failing test case input:
3
1 5
3 9
7 8

Expected output:
3

Actual output:
10


Fixed submission (verdict: Accepted):
n=int(input())
a=sorted([[i]+list(map(int,input().split()))for i in range(n)],key=lambda x:x[1])
s=[]
for i in range(n-1):
    s.append((a[i+1][1]-a[i][1],a[i][0],a[i+1][0]))
a=sorted(a,key=lambda x:x[2])
for i in range(n-1):
    s.append((a[i+1][2]-a[i][2],a[i][0],a[i+1][0]))
s.sort()
t=[i for i in range(n)]
def f(x):
    if x==t[x]:
        return x
    t[x]=f(t[x])
    return f(t[x])
c=0
for i,j,h in s:
    j,h=f(j),f(h)
    if h!=j:
        t[j]=h
        c+=i
print(c)
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=0:
            print(GOMI,end=" ")
        else:
            print(GOMI)
    print()


Failing test case input:
3 2 2
1 2
2 6
4 3
0 0 2
1 3 4

Expected output:
2 6
6 18
3 9


Actual output:
2
6 
6
18 
3
9 


Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l:
            print(GOMI,end=" ")
        else:
            print(GOMI)




Failing test case input:
4 -1 8
3 1
0 3
4 15
-3 -1 3
2 2 0

Expected output:
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0


Actual output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n, m, l = map(int, input().split())
mat_a = []
mat_b = []

for i in range(n):
    mat_a.append(list(map(int, input().split())))
    
for j in range(m):
    mat_b.append(list(map(int, input().split())))
    
for p in range(n):
    sum = 0
    mat_c = []
    for q in range(l):
        for r in range(m):
            sum += mat_a[p][r] * mat_b[r][q]
        mat_c.append(sum)
    print(' '.join(map(str, mat_c)))





Failing test case input:
3 2 3
1 2
0 3
4 5
1 2 1
1 3 2

Expected output:
3 8 5
3 9 6
9 23 14


Actual output:
3 11 16
3 12 18
9 32 46


Fixed submission (verdict: Accepted):
n, m, l = map(int, input().split())
mat_a = []
mat_b = []

for i in range(n):
    mat_a.append(list(map(int, input().split())))
    
for j in range(m):
    mat_b.append(list(map(int, input().split())))
    
for p in range(n):
    mat_c = []
    for q in range(l):
        sum = 0
        for r in range(m):
            sum += mat_a[p][r] * mat_b[r][q]
        mat_c.append(sum)
    print(' '.join(map(str, mat_c)))
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l:
            print(GOMI,end=" ")
        else:
            print(GOMI)


Failing test case input:
3 0 6
1 1
2 2
4 15
0 2 0
1 5 4

Expected output:
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0


Actual output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l:
            print(GOMI,end=" ")
        else:
            print(GOMI)

         



Failing test case input:
3 2 3
1 1
3 3
4 9
1 2 2
1 3 2

Expected output:
2 5 4
6 15 12
13 35 26


Actual output:
2 5 4 6 15 12 13 35 26 

Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l=list(map(int,input().split()))

m_A=[list(map(int,input().split())) for i in range(n)]

m_B=[list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for k in range(l):
        s=0
        for j in range(m):
            s+=m_A[i][j]*m_B[j][k]
        print(s)

Failing test case input:
4 0 6
1 1
-1 2
4 1
1 0 -1
1 12 5

Expected output:
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0


Actual output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Fixed submission (verdict: Accepted):
n,m,l=list(map(int,input().split()))

m_A=[list(map(int,input().split())) for i in range(n)]

m_B=[list(map(int,input().split())) for i in range(m)]

for i in range(n):
    t=[]
    for k in range(l):
        s=0
        
        for j in range(m):
            s+=m_A[i][j]*m_B[j][k]
        t.append(s)
    print(*t)
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n, m, l = map(int, input().split(' '))

A = []
for i in range(n):
    A.append(list(map(int, input().split(' '))))


B = []
for i in range(m):
    B.append(list(map(int, input().split(' '))))

C = [[0 for i in range(l)] for j in range(n)]

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

for c in C:
    print(' '.join([str(x) for x in c]))

Failing test case input:
3 2 3
1 1
3 3
5 9
1 2 2
1 3 2

Expected output:
2 5 4
6 15 12
14 37 28


Actual output:
(0, 0) (0, 0) (0, 0)
(0, 0) (0, 1) (1, 0)
(0, 1) (0, 0) (0, 1)
(0, 1) (0, 1) (1, 1)
(0, 2) (0, 0) (0, 2)
(0, 2) (0, 1) (1, 2)
(1, 0) (1, 0) (0, 0)
(1, 0) (1, 1) (1, 0)
(1, 1) (1, 0) (0, 1)
(1, 1) (1, 1) (1, 1)
(1, 2) (1, 0) (0, 2)
(1, 2) (1, 1) (1, 2)
(2, 0) (2, 0) (0, 0)
(2, 0) (2, 1) (1, 0)
(2, 1) (2, 0) (0, 1)
(2, 1) (2, 1) (1, 1)
(2, 2) (2, 0) (0, 2)
(2, 2) (2, 1) (1, 2)
2 5 4
6 15 12
14 37 28


Fixed submission (verdict: Accepted):
n, m, l = map(int, input().split(' '))

A = []
for i in range(n):
    A.append(list(map(int, input().split(' '))))


B = []
for i in range(m):
    B.append(list(map(int, input().split(' '))))

C = [[0 for i in range(l)] for j in range(n)]

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

for c in C:
    print(' '.join([str(x) for x in c]))

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n, m, l = map(int, input().split())
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
Sum = []
key = 0
for i in range(n):
    Sum_s = []
    for j in range(l):
        key = 0
        for k in range(m):
            key += A[i][k] * B[k][j]
        Sum_s.append(key)
    Sum.append(Sum_s)
print(Sum)
for i in range(n):
    for j in range(l - 1):
        print(Sum[i][j], end = ' ')
    print(Sum[i][l - 1])



Failing test case input:
3 2 3
1 2
0 3
4 5
-1 0 1
0 1 4

Expected output:
-1 2 9
0 3 12
-4 5 24


Actual output:
[[-1, 2, 9], [0, 3, 12], [-4, 5, 24]]
-1 2 9
0 3 12
-4 5 24


Fixed submission (verdict: Accepted):
n, m, l = map(int, input().split())
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
Sum = []
key = 0
for i in range(n):
    Sum_s = []
    for j in range(l):
        key = 0
        for k in range(m):
            key += A[i][k] * B[k][j]
        Sum_s.append(key)
    Sum.append(Sum_s)
for i in range(n):
    for j in range(l - 1):
        print(Sum[i][j], end = ' ')
    print(Sum[i][l - 1])
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
    if j!=l:
        print(GOMI,end=" ")
    else:
        print(GOMI)
    print()


Failing test case input:
3 2 3
1 2
2 3
4 5
0 2 2
1 3 2

Expected output:
2 8 6
3 13 10
5 23 18


Actual output:
6 
10 
18 


Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
matrixL = [[0]*m for i in range(n)]
matrixR = [[0]*l for i in range(m)]
for row in range(n):
    matrixL[row] = [int(i) for i in input().split()]

for row in range(m):
    matrixR[row] = [int(i) for i in input().split()]
c = [[0] * l for i in range(n)]
for ansColumn in range(l):
    for row in range(n):
        for column in range(m):
            c[row][ansColumn] = c[row][ansColumn] + matrixL[row][column] * matrixR[column][ansColumn]
for row in range(n):
    for column in range(l):
        print("%d " %c[row][column], end ="")
        if column == m -1:
            print("")


Failing test case input:
3 2 3
0 1
3 4
4 5
2 2 2
1 3 4

Expected output:
1 3 4
10 18 22
13 23 28


Actual output:
1 3 
4 10 18 
22 13 23 
28 

Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
matrixL = [[0]*m for i in range(n)]
matrixR = [[0]*l for i in range(m)]
for row in range(n):
    matrixL[row] = [int(i) for i in input().split()]

for row in range(m):
    matrixR[row] = [int(i) for i in input().split()]
c = [[0] * l for i in range(n)]
for ansColumn in range(l):
    for row in range(n):
        for column in range(m):
            c[row][ansColumn] = c[row][ansColumn] + matrixL[row][column] * matrixR[column][ansColumn]
for row in range(n):
    for column in range(l):
        if column == l -1:
            print(c[row][column])
        else:
            print("%d " %c[row][column], end ="")
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l:
            print(GOMI)
        else:
            print(GOMI,end=" ")
    print()
         



Failing test case input:
3 2 3
1 1
2 3
4 1
2 2 1
1 3 2

Expected output:
3 5 3
7 13 8
9 11 6


Actual output:
3
5
3

7
13
8

9
11
6



Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=1:
            print(GOMI,end=" ")
        else:
            print(GOMI)
    print()


Failing test case input:
3 2 3
0 2
0 3
0 2
1 2 1
1 3 2

Expected output:
2 6 4
3 9 6
2 6 4


Actual output:
2 6
4 
3 9
6 
2 6
4 


Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n, m, l = map(int, input().split()) 

a_matrix = [list(map(int, input().split())) for row in range(n)] 
b_matrix = [list(map(int, input().split())) for row in range(m)] 

result_matrix = [[0 for x in range(l)] for y in range(n)] 
print(result_matrix)
for i in range(n):
	for j in range(l):
		for k in range(m):
			result_matrix[i][j] += a_matrix[i][k] * b_matrix[k][j]

for i in range(n):
	print(' '.join(map(str, result_matrix[i])))

Failing test case input:
2 0 5
2 1
0 5
4 27
-6 -1 3
1 3 4

Expected output:
0 0 0 0 0
0 0 0 0 0


Actual output:
[[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
0 0 0 0 0
0 0 0 0 0


Fixed submission (verdict: Accepted):
n, m, l = map(int, input().split()) 

a_matrix = [list(map(int, input().split())) for row in range(n)] 
b_matrix = [list(map(int, input().split())) for row in range(m)] 

result_matrix = [[0 for x in range(l)] for y in range(n)] 
for i in range(n):
	for j in range(l):
		for k in range(m):
			result_matrix[i][j] += a_matrix[i][k] * b_matrix[k][j]

for i in range(n):
	print(' '.join(map(str, result_matrix[i])))
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l:
            print(GOMI,end=" ")
        else:
            print(GOMI)
        print()



Failing test case input:
3 2 3
2 2
3 3
4 5
1 2 2
1 3 2

Expected output:
4 10 8
6 15 12
9 23 18


Actual output:
4 
10 
8 
6 
15 
12 
9 
23 
18 


Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
x, y, z = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(x)]
B = [list(map(int, input().split())) for _ in range(y)]
ans_s = []
ans = []

for i in range(x):
    for j in range(z):
        p = 0
        for k in range(y):
            p += A[i][k] * B[k][j]
        ans_s.append(p)
    ans.append((ans_s))

for i in ans:
    print(' '.join([str(v) for v in ans]))


Failing test case input:
3 2 2
1 2
2 6
4 3
0 0 2
1 5 4

Expected output:
2 10
6 30
3 15


Actual output:
[2, 10, 6, 30, 3, 15] [2, 10, 6, 30, 3, 15] [2, 10, 6, 30, 3, 15]
[2, 10, 6, 30, 3, 15] [2, 10, 6, 30, 3, 15] [2, 10, 6, 30, 3, 15]
[2, 10, 6, 30, 3, 15] [2, 10, 6, 30, 3, 15] [2, 10, 6, 30, 3, 15]


Fixed submission (verdict: Accepted):
x, y, z = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(x)]
B = [list(map(int, input().split())) for _ in range(y)]
ans_s = []
ans = []

for i in range(x):
    ans_s = []
    for j in range(z):
        p = 0
        for k in range(y):
            p += A[i][k] * B[k][j]
        ans_s.append(p)
    ans.append((ans_s))

for i in ans:
    print(' '.join([str(v) for v in i]))
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l:
            print(GOMI,end=" ")
        else:
            print(GOMI)
print()



Failing test case input:
3 2 3
1 1
2 3
1 1
2 3 1
1 3 2

Expected output:
3 6 3
7 15 8
3 6 3


Actual output:
3 6 3 7 15 8 3 6 3 


Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n, m, l, = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

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

for li in range(n):
    print(" ".join([str(s) for s in C[ni]]))

Failing test case input:
3 2 3
1 2
1 3
4 5
1 2 1
1 3 2

Expected output:
3 8 5
4 11 7
9 23 14


Actual output:
9 23 14
9 23 14
9 23 14


Fixed submission (verdict: Accepted):
n, m, l = [int(i) for i in input().split()]
 
A = []
B = []
C = []
for ni in range(n):
    A.append([int(i) for i in input().split()])
 
for mi in range(m):
    B.append([int(i) for i in input().split()])
 
for i in range(n):
    C.append([])
    for j in range(l):
        C[i].append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]
 
for ni in range(n):
    print(" ".join([str(s) for s in C[ni]]))

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c=map(int,input().split())
A=[]
B=[]

for i in range(a):A.append(list(map(int,input().split())))
for i in range(b):B.append(list(map(int,input().split())))

for A_r in A:
  print("".join(map(str,[sum(x*y for x,y in zip(A_r,[B_r[k] for B_r in B])) for k in range(1)])))


Failing test case input:
4 0 12
1 1
-1 2
4 1
1 0 -1
1 12 5

Expected output:
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0


Actual output:
0
0
0
0


Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
A=[]
B=[]
for i in range(n): A.append(list(map(int,input().split())))
for j in range(m): B.append(list(map(int,input().split())))
for A_r in A:
    print(" ".join(map(str,[sum([x*y for x,y in zip(A_r,[B_r[k] for B_r in B])]) for k in range(l)])))
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
[n,m,l] = map(int, input().split())
a = []
b = []
c = [[0 for k in range(l)] for i in range(n)]
for i in range(n):
    a.append(list(map(int, input().split())))

for j in range(m):
    b.append(list(map(int, input().split())))

for i in range(n):
    for k in range(l):
        s = 0
        for j in range(m):
            s += a[i][j] * b[j][k]
        c[i][k] = s

for i in range(n):
    for k in range(l):
        print(c[i][k],end='')
        if k!= n-1:    
            print(' ',end='')
        else:
            print()

Failing test case input:
3 0 7
4 1
2 2
4 12
0 0 3
2 3 2

Expected output:
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0


Actual output:
0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 

Fixed submission (verdict: Accepted):
[n,m,l] = map(int, input().split())
a = []
b = []
c = [[0 for k in range(l)] for i in range(n)]
for i in range(n):
    a.append(list(map(int, input().split())))

for j in range(m):
    b.append(list(map(int, input().split())))

for i in range(n):
    for k in range(l):
        s = 0
        for j in range(m):
            s += a[i][j] * b[j][k]
        c[i][k] = s

for i in range(n):
    for k in range(l):
        print(c[i][k],end='')
        if k!= l-1:    
            print(' ',end='')
        else:
            print()

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l=map(int,input().split())
A=[]
B=[]

for i in range(n):A.append(list(map(int,input().split())))
for i in range(m):B.append(list(map(int,input().split())))

for A_r in A:
  print("".join(map(str,[sum(x*y for x,y in zip(A_r,[B_r[k] for B_r in B])) for k in range(1)])))


Failing test case input:
3 2 3
1 4
0 3
4 5
-1 0 1
0 2 0

Expected output:
-1 8 1
0 6 0
-4 10 4


Actual output:
-1
0
-4


Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
A=[]
B=[]
for i in range(n): A.append(list(map(int,input().split())))
for j in range(m): B.append(list(map(int,input().split())))
for A_r in A:
    print(" ".join(map(str,[sum([x*y for x,y in zip(A_r,[B_r[k] for B_r in B])]) for k in range(l)])))
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n, m, l = map(int, input().split())

nm = []
ml = []

for _ in range(n):
	lista = list(map(int, input().split()))
	nm.append(lista)

for _ in range(m):
	lista = list(map(int, input().split()))
	ml.append(lista)
	
matrix = []

print(nm)
print(ml)

for i in range(n):
	lista = []
	for j in range(l):
		sum = 0
		for k in range(m):
			sum += nm[i][k]*ml[k][j]
		lista.append(sum)
	matrix.append(lista)

for i in range(n):
	text = ""
	for j in range(l):
		text += str(matrix[i][j]) + " "
	print(text[:-1])

Failing test case input:
3 2 2
1 2
2 11
4 8
0 0 2
1 5 4

Expected output:
2 10
11 55
8 40


Actual output:
[[1, 2], [2, 11], [4, 8]]
[[0, 0, 2], [1, 5, 4]]
2 10
11 55
8 40


Fixed submission (verdict: Accepted):
n, m, l = map(int, input().split())

nm = []
ml = []

for _ in range(n):
	lista = list(map(int, input().split()))
	nm.append(lista)

for _ in range(m):
	lista = list(map(int, input().split()))
	ml.append(lista)
	
matrix = []

for i in range(n):
	lista = []
	for j in range(l):
		sum = 0
		for k in range(m):
			sum += nm[i][k]*ml[k][j]
		lista.append(sum)
	matrix.append(lista)

for i in range(n):
	text = ""
	for j in range(l):
		text += str(matrix[i][j]) + " "
	print(text[:-1])

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
import sys

(n, m, l) = sys.stdin.readline().rstrip('\r\n').split(' ')
n = int(n)
m = int(m)
l = int(l)

a = []
b = []
c = []
for ii in range(n):
  a.append([int(x) for x in input().rstrip('\r\n').split(' ')])

for ii in range(m):
  b.append([int(x) for x in input().rstrip('\r\n').split(' ')])

for ii in range(n):
  c.append([])
  for jj in range(l):
    c[ii].append(0)
    for kk in range(m):
      c[ii][jj] += a[ii][kk] * b[kk][jj]
    print(str(c[ii][jj]) + ' ', end='')



Failing test case input:
3 2 3
1 1
2 3
4 5
1 2 1
1 3 2

Expected output:
2 5 3
5 13 8
9 23 14


Actual output:
2 5 3 5 13 8 9 23 14 

Fixed submission (verdict: Accepted):
import sys

(n, m, l) = sys.stdin.readline().rstrip('\r\n').split(' ')
n = int(n)
m = int(m)
l = int(l)

a = []
b = []
c = []
for ii in range(n):
  a.append([int(x) for x in input().rstrip('\r\n').split(' ')])

for ii in range(m):
  b.append([int(x) for x in input().rstrip('\r\n').split(' ')])

for ii in range(n):
  c.append([])
  for jj in range(l):
    c[ii].append(0)
    for kk in range(m):
      c[ii][jj] += a[ii][kk] * b[kk][jj]
    c[ii][jj] = str(c[ii][jj])
  print(' '.join(c[ii]))
Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
(n, m, l) = [int(i) for i in input().split()]
print(n)
A = []
for nc in range(n):
    A.append([int(i) for i in input().split()])
B = []
for mc in range(m):
    B.append([int(i) for i in input().split()])

product = [[0 for d in range(l)] for dd in range(n)]

for nc in range(n):
    for lc in range(l):
        for mc in range(m):
            product[nc][lc] += A[nc][mc] * B[mc][lc]

for r in product:
    print(' '.join([str(d) for d in r]))

Failing test case input:
2 -1 2
0 0
0 5
2 27
0 -1 3
1 2 1

Expected output:
0 0
0 0


Actual output:
2
0 0
0 0


Fixed submission (verdict: Accepted):
(n, m, l) = [int(i) for i in input().split()]
A = []
for nc in range(n):
    A.append([int(i) for i in input().split()])
B = []
for mc in range(m):
    B.append([int(i) for i in input().split()])

product = [[0 for d in range(l)] for dd in range(n)]

for nc in range(n):
    for lc in range(l):
        for mc in range(m):
            product[nc][lc] += A[nc][mc] * B[mc][lc]

for r in product:
    print(' '.join([str(d) for d in r]))

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n, m, l = map(int, input().split())
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
C = [[0 for i in range(l)] for j in range(n)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            print(A[i][k], B[k][j])
            C[i][j] += A[i][k]*B[k][j]
for i in range(n):
    print(" ".join(map(str, C[i])))

Failing test case input:
3 2 3
1 2
2 3
2 0
2 4 0
1 3 2

Expected output:
4 10 4
7 17 6
4 8 0


Actual output:
1 2
2 1
1 4
2 3
1 0
2 2
2 2
3 1
2 4
3 3
2 0
3 2
2 2
0 1
2 4
0 3
2 0
0 2
4 10 4
7 17 6
4 8 0


Fixed submission (verdict: Accepted):
n, m, l = map(int, input().split())
A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]
C = [[0 for i in range(l)] for j in range(n)]
for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += A[i][k]*B[k][j]
for i in range(n):
    print(" ".join(map(str, C[i])))

Problem: p02414
Buggy submission (Python3, verdict: Wrong Answer):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l:
            print(GOMI,end=" ")
        else:
            print(GOMI)
            print()


Failing test case input:
3 2 3
1 2
0 3
4 5
0 2 1
0 3 2

Expected output:
0 8 5
0 9 6
0 23 14


Actual output:
0 8 5 0 9 6 0 23 14 

Fixed submission (verdict: Accepted):
n,m,l = map(int,input().split())
YEAH = [list(map(int,input().split())) for i in range(n)]
FUCK = [list(map(int,input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        GOMI = 0
        for k in range(m):
            GOMI += FUCK[k][j]*YEAH[i][k]
        if j!=l-1:
            print(GOMI,end=" ")
        else:
            print(GOMI,end="")
    print()
Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if c%2==0:
    print ("0")
else:
    print (a*b)

Failing test case input:
6 5 5

Expected output:
0


Actual output:
30


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a%2==0 or b%2==0 or c%2==0:
    print ("0")
else:
    print (min(a*b,b*c,c*a))

Problem: p04005
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a % 2 == 0 or b % 2 == 0 or c % 2 == 0:
    print(0)
else:
    d = [a, b, c]
    d.sort()
    print(a * b)


Failing test case input:
19 9 5

Expected output:
45


Actual output:
171


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a % 2 == 0 or b % 2 == 0 or c % 2 == 0:
    print(0)
else:
    d = [a, b, c]
    d.sort()
    print(d[0] * d[1])

Problem: p04005
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a = list(map(int,input().split()))

f = 0
for i in a:
    if i % 2 == 0:
        f = 1

if f:
    ans = 0
else:
    tmp = []
    for i in range(2):
        for j in range(i+1,2):
            tmp.append(a[i] * a[j])
    ans = min(tmp)

print(ans)


Failing test case input:
19 9 5

Expected output:
45


Actual output:
171


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))

f = 0
for i in a:
    if i % 2 == 0:
        f = 1

if f:
    ans = 0
else:
    tmp = []
    for i in range(2):
        for j in range(i+1,3):
            tmp.append(a[i] * a[j])
    
    ans = min(tmp)

print(ans)

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
str = input()
num = list(map(int,str.split(' ')))
if (num[0]%2)and(num[1]%2)and(num[2]%2)==0:
	print(0)
else:
	num.sort()
	print(num[0]*num[1])


Failing test case input:
4 1 4

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):
str = input()
num = list(map(int,str.split(' ')))
if ((num[0]%2)and(num[1]%2)and(num[2]%2))==0:
	print(0)
else:
	num.sort()
	print(num[0]*num[1])

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = list(map(int, input().split()))
if a % 2 == 1 and b % 2 == 1 and c % 2 == 1:
    print(b * c)
else:
    print(0)


Failing test case input:
3 5 5

Expected output:
15


Actual output:
25


Fixed submission (verdict: Accepted):
a, b, c = list(map(int, input().split()))
if a % 2 == 1 and b % 2 == 1 and c % 2 == 1:
    print(min(a*b, b*c, a*c))
else:
    print(0)

Problem: p04005
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a%2==0 and b%2==0 and c%2==0:
    print(0)
else:
    print(min(a*b, b*c, c*a))

Failing test case input:
4 1 4

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a%2==0 or b%2==0 or c%2==0:
    print(0)
else:
    print(min(a*b, b*c, c*a))
Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c  = map(int, input().split())
l = [a, b, c]
l.sort()

if a%2==0 or b%2==0 or c%2==0:
    ans = 0
else:
    ans = a*b

print(ans)

Failing test case input:
19 5 5

Expected output:
25


Actual output:
95


Fixed submission (verdict: Accepted):
a, b, c  = map(int, input().split())
l = [a, b, c]
l.sort()

if a%2==0 or b%2==0 or c%2==0:
    ans = 0
else:
    ans = min(a*b, b*c, c*a)

print(ans)

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,input().split()))

a.sort()

if a[0] == a[1] and a[0]*a[1] % 2 == 0:
  print(0)
else:
  print(a[0]*a[1])

Failing test case input:
4 1 4

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))

a.sort()

if a[0]*a[1]*a[2] % 2 == 0:
  print(0)
else:
  print(a[0]*a[1])

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
abc=sorted([a,b,c])
print(abc[0]*abc[1])


Failing test case input:
-1 2 2

Expected output:
0


Actual output:
-2


Fixed submission (verdict: Accepted):
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
abc=sorted([a,b,c])
if abc[2]%2==0:
    print(0)
else:
    print(abc[0]*abc[1])

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l = [int(x) for x in input().split()]

l.sort(reverse=True)


if len([x for x in l if x % 2 != 0]) == 0:
    print(0)
else:
    ans = l[1] * l[2]
    print(ans)

Failing test case input:
38 5 5

Expected output:
0


Actual output:
25


Fixed submission (verdict: Accepted):
l = [int(x) for x in input().split()]

l.sort(reverse=True)


if len([x for x in l if x % 2 == 0]) > 0:
    print(0)
else:
    ans = min(l[1]*l[2], l[0]*l[1], l[0]*l[2])
    print(ans)

Problem: p04005
Buggy submission (Python (3.8.2), verdict: Wrong Answer):









import sys
input = sys.stdin.readline

A, B, C = map(int, input().split())

ans = 0
if (A * B * C) % 2 != 0:
    ans = A*B
print(ans)


Failing test case input:
19 5 5

Expected output:
25


Actual output:
95


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

L = list(map(int, input().split()))
L.sort()
A, B, C = L

ans = 0
if (A * B * C) % 2 != 0:
    ans = A*B
print(ans)

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def myAnswer(A:int,B:int,C:int) -> int:
   red = C 
   blue = C 
   if(C % 2 == 1):
      red += 1
   return abs(A*B*red - A*B*blue)
      

def modelAnswer():
   tmp=1
def main():
   A,B,C = map(int,input().split())
   print(myAnswer(A,B,C))
if __name__ == '__main__':
   main()

Failing test case input:
19 9 5

Expected output:
45


Actual output:
171


Fixed submission (verdict: Accepted):
def myAnswer(A:int,B:int,C:int) -> int:
   l = sorted([A,B,C])
   red = l[2] 
   blue = l[2] 
   if(l[2] % 2 == 1):
      red += 1
   return abs(l[0]*l[1]*red - l[0]*l[1]*blue)
      

def modelAnswer():
   tmp=1
def main():
   A,B,C = map(int,input().split())
   print(myAnswer(A,B,C))
if __name__ == '__main__':
   main()
Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())


def count_odd(*nums):
    counter = 0
    for num in nums:
        if num % 2 == 0:
            counter += 1
    return counter


def min_2(*nums):
    mins = sorted(nums)
    return mins[:2]


if count_odd(A, B, C) >= 2:
    print(0)
else:
    m1, m2 = min_2(A, B, C)
    print(m1 * m2)


Failing test case input:
5 3 10

Expected output:
0


Actual output:
15


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())


def count_odd(*nums):
    counter = 0
    for num in nums:
        if num % 2 == 0:
            counter += 1
    return counter


def min_2(*nums):
    mins = sorted(nums)
    return mins[:2]


if count_odd(A, B, C) >= 1:
    print(0)
else:
    m1, m2 = min_2(A, B, C)
    print(m1 * m2)

Problem: p04005
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
INF = 1 << 60
MOD = 10**9 + 7 
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    a, b, c = map(int, input().split())
    if ~a&1 and ~b&1 and ~c&1:
        print(0)
    else:
        print(min(a * b, b * c, c * a))
resolve()

Failing test case input:
1 3 10

Expected output:
0


Actual output:
3


Fixed submission (verdict: Accepted):
import sys
INF = 1 << 60
MOD = 10**9 + 7 
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    a, b, c = map(int, input().split())
    if ~a&1 or ~b&1 or ~c&1:
        print(0)
    else:
        print(min(a * b, b * c, c * a))
resolve()

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(10**6)

a=list(map(int,input().split()))

newa=sorted(a)





if newa[2]%2==0 or newa[1]%2==0 or newa[0]%2==0:
    print("0")
else:
    print(a[0]*a[1])

Failing test case input:
19 9 5

Expected output:
45


Actual output:
171


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(10**6)

a=list(map(int,input().split()))

newa=sorted(a)





if newa[2]%2==0 or newa[1]%2==0 or newa[0]%2==0:
    print("0")
else:
    print(newa[0]*newa[1])

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int,input().split())
if(A*B*C%2 == 0):
  print(0)
else:
  print(A*B*C-(A-1)*B*C)

Failing test case input:
3 5 5

Expected output:
15


Actual output:
25


Fixed submission (verdict: Accepted):
A, B, C = map(int,input().split())
if(A*B*C%2 == 0):
  print(0)
else:
  print(min(A*B, B*C, C*A))

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if (a*b*c)&2==0:
    print(0)
else:
    print(min(a*b,b*c,c*a))


Failing test case input:
1 3 10

Expected output:
0


Actual output:
3


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if (a*b*c)%2==0:
    print(0)
else:
    print(min(a*b,b*c,c*a))
Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
str = input()
num = list(map(int,str.split(' ')))
if (num[0]%2)&(num[1]%2)&(num[2])==0:
	print(0)
else:
	num.sort()
print(num[0]*num[1])


Failing test case input:
0 0 10

Expected output:
0


Actual output:
0
0


Fixed submission (verdict: Accepted):
str = input()
num = list(map(int,str.split(' ')))
if ((num[0]%2)and(num[1]%2)and(num[2]%2))==0:
	print(0)
else:
	num.sort()
	print(num[0]*num[1])

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a%2 or b%2 or c%2:
  ans=min([a*b,a*c,b*c])
else:
  ans=0
print(ans)

Failing test case input:
-1 2 6

Expected output:
0


Actual output:
-6


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a%2 and b%2 and c%2:
  ans=min([a*b,a*c,b*c])
else:
  ans=0
print(ans)

Problem: p04005
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A = sorted(list(map(int, input().split())))
if all(a % 2 == 0 for a in A):
	print(0)
else:
	print(A[0] * A[1])

Failing test case input:
5 3 10

Expected output:
0


Actual output:
15


Fixed submission (verdict: Accepted):
A = sorted(list(map(int, input().split())))
if any(a % 2 == 0 for a in A):
	print(0)
else:
	print(A[0] * A[1])

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())

if (A%2)*(B%2)*(C%2)==0:
  Answer = 0
else:
  Answer = A*B*C/max(A,B,C)

print(Answer)

Failing test case input:
19 5 5

Expected output:
25


Actual output:
25.0


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())

if (A%2)*(B%2)*(C%2)==0:
  Answer = 0
else:
  Answer = min(A*B,A*C,B*C)

print(Answer)

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())
if A*B*C % 2 == 0 :
    print(0)
else :
    L = [A,B,C]
    L = sorted(L)
    print(B*C)
    

Failing test case input:
3 1 13

Expected output:
3


Actual output:
13


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())
if A*B*C % 2 == 0 :
    print(0)
else :
    L = [A,B,C]
    L = sorted(L)
    ans = min(A*B,B*C,C*A)
    print(ans)

Problem: p04005
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def resolve():
    A, B, C = list(map(int, input().split()))
    ans = ''
    if A % 2 == 0 or B % 2 == 0 or C % 2 == 0:
        ans = 0
    else:
        ans = B * C

    print(ans)
    return


resolve()

Failing test case input:
3 1 7

Expected output:
3


Actual output:
7


Fixed submission (verdict: Accepted):
def resolve():
    A, B, C = list(map(int, input().split()))
    ans = ''
    if A % 2 == 0 or B % 2 == 0 or C % 2 == 0:
        ans = 0
    else:
        ans = min(B * C, C * A, A * B)

    print(ans)
    return


resolve()
Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())
if A*B*C % 2 == 0 :
    print(0)
else :
    L = [A,B,C]
    L = sorted(L)
    print(A*B)
    

Failing test case input:
19 9 5

Expected output:
45


Actual output:
171


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())
if A*B*C % 2 == 0 :
    print(0)
else :
    L = [A,B,C]
    L = sorted(L)
    ans = min(A*B,B*C,C*A)
    print(ans)

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

l = list(map(int, input().split()))

if all(v % 2 == 0 for v in l):
    print(0)
else:
    l = sorted(l)
    print(l[0]*l[1])


Failing test case input:
4 1 4

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

l = list(map(int, input().split()))

if any(v % 2 == 0 for v in l):
    print(0)
else:
    l = sorted(l)
    print(l[0]*l[1])

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a,b,c = map(int,input().split())

if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    print(0)
else:
    print(min(a*b,b*c,c*a))


Failing test case input:
6 5 5

Expected output:
0


Actual output:
25


Fixed submission (verdict: Accepted):

a,b,c = map(int,input().split())

if a % 2 == 0 or b % 2 == 0 or c % 2 == 0:
    print(0)
else:
    print(min(a*b,b*c,c*a))

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
A, B, C = map(int, input().split())
l = [A,B,C]

max_index = l.index(max(l))
if max_index == 0:
    large = A * B * math.floor(C/2)
elif max_index == 1:
    large = B * C * math.floor(A/2)
else:
    large = C * A * math.floor(B/2)


ans = A*B*C - 2*large
print(ans)




Failing test case input:
5 3 10

Expected output:
0


Actual output:
50


Fixed submission (verdict: Accepted):
import math
A, B, C = map(int, input().split())
l = [A,B,C]

max_index = l.index(max(l))
if max_index == 0:
    large = B * C * math.floor(A/2)
elif max_index == 1:
    large = C * A * math.floor(B/2)
else:
    large = A * B * math.floor(C/2)
ans = (A*B*C - large) - large

print(ans)
Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    a,b,c = I2()
    print(0 if a%2 == 0 and b%2 == 0 and c%2 == 0 else min(a*b,b*c))

Failing test case input:
-1 2 10

Expected output:
0


Actual output:
-2


Fixed submission (verdict: Accepted):
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    a,b,c = I2()
    print(0 if a%2 == 0 or b%2 == 0 or c%2 == 0 else min(a*b,b*c,c*a))

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
div = C 
ans = 0
if A * B * C % 2 != 0:
    ans = abs((A * B * div) - (A * B * (C - div)))
print(ans)

Failing test case input:
5 1 13

Expected output:
5


Actual output:
65


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
ans = 0
if A * B * C % 2 != 0:
    ans = min((A * B), (A * C), (B * C))
print(ans)

Problem: p04005
Buggy submission (Python (3.8.2), verdict: Wrong Answer):









import sys
input = sys.stdin.readline

A, B, C = map(int, input().split())

ans = 0
if C % 2 != 0:
    ans = A * B
elif B % 2 != 0:
    ans = A * C
elif A % 2 != 0:
    ans = B * C
print(ans)


Failing test case input:
4 1 4

Expected output:
0


Actual output:
16


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

L = list(map(int, input().split()))
L.sort()
A, B, C = L

ans = 0
if (A * B * C) % 2 != 0:
    ans = A*B
print(ans)

Problem: p04005
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=input().split()
dim=[int(x[0]),int(x[1]),int(x[2])]
print(dim)
if (dim[0]*dim[1]*dim[2])%2==0:
  print(0)
else:
  dim.remove(max(dim))
  print(dim[0]*dim[1])
  
  

Failing test case input:
0 2 10

Expected output:
0


Actual output:
[0, 2, 10]
0


Fixed submission (verdict: Accepted):
x=input().split()
dim=[int(x[0]),int(x[1]),int(x[2])]
if (dim[0]*dim[1]*dim[2])%2==0:
  print(0)
else:
  dim.remove(max(dim))
  print(dim[0]*dim[1])