ZhenlongDai/ACPR huggingface dataset:
Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
from itertools import combinations as comb

def get_ans():
	m, n = (int(x) for x in input().split())
	if m==0 and n==0:
		quit()
	ans = 0
	for nums in comb(list(range(1, min(m,n-3))), 3):
		if sum(nums) == n:
			ans += 1
	print(ans)
	
while True:
	get_ans()


Failing test case input:
10 6
0 0

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
from itertools import combinations as comb
def get_ans(m, n):
	ans = 0
	for nums in comb(list(range(1, min(m+1,n-2))), 3):
		if sum(nums) == n:
			ans += 1
	print(ans)
	
while True:
	m, n = (int(x) for x in input().split())
	if m==0 and n==0:
		quit()
	get_ans(m, n)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
inp = []
count = -1
while 1:
    count += 1
    inp.append(input())
    if inp[count] == "0 0":
        break
array = [[i2 for i2 in inp[i].split()]for i in range(len(inp)-1)]
for i in range(len(array)):
    count = 0
    n = int(array[i][0])
    x = int(array[i][1])
    for i2 in range(1,int(n/2)+1):
        for i3 in range(2,n):
            if i2 == i3:
                continue
            num = x - i2 - i3
            if num <= n and num > i3:
                count += 1
    print(count)

Failing test case input:
17 25
0 0

Expected output:
31


Actual output:
48


Fixed submission (verdict: Accepted):
array = []
while 1 :
    n = input()
    if n == "0 0":
        break
    array.append(n.split())
for i in range(len(array)):
    count = 0
    for i2 in range(1,int(array[i][0])+1):
        for i3 in range(i2+1,int(array[i][0])+1):
            number =int(array[i][1])-(i2+i3)
            if number > i3 and number <= int(array[i][0]):
                count += 1
    print(count)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    n,x = map(int,input().split())
    if n == 0 and x == 0:
        break
    l = [i+j+k for i in range(n) for j in range(n) for k in range(n)]
    print(l.count(x-3))

Failing test case input:
11 14
0 0

Expected output:
10


Actual output:
75


Fixed submission (verdict: Accepted):
while True:
    n,x = map(int,input().split())
    if n == 0 and x == 0:
        break
    l = [i+j+k for i in range(n-2) for j in range(i+1,n-1) for k in range(j+1,n)]
    print(l.count(x-3))

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
from sys import stdin

while True:
    n, x = [int(x) for x in stdin.readline().rstrip().split()]
    if n == 0 and x == 0:
        break
    else:
        count = 0
        for i in range(1, n-1):
            for j in range(i+1, n-2):
                if j < x-i-j <= n:
                    count += 1
        else:
            print(count)


Failing test case input:
8 14
0 0

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
from sys import stdin

while True:
    n, x = [int(x) for x in stdin.readline().rstrip().split()]
    if n == 0 and x == 0:
        break
    else:
        count = 0
        for i in range(1, n-1):
            for j in range(i+1, n):
                if j < x-i-j <= n:
                    count += 1
        else:
            print(count)
Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    num = list(map(int,input().split()))
    if(num[0] == 0 and num[1] == 0): break
    c = 0
    for i in range(1,num[0] - 2):
        for j in range(i+1,num[0] - 1):
            for k in range(j+1,num[0]):
                if(i+j+k == num[1]): c
    
    print(c)


Failing test case input:
15 19
0 0

Expected output:
20


Actual output:
0


Fixed submission (verdict: Accepted):
while True:
    num = list(map(int,input().split()))
    if(num[0] == 0 and num[1] == 0): break
    c = 0
    for i in range(1,num[0] - 1):
        for j in range(i+1,num[0]):
            for k in range(j+1,num[0]+1):
                if(i+j+k == num[1]): c += 1
    
    print(c)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    (n,x) = map(int,input().split())
    if n==x==0:
        break

    goukei = 0
    for i in range(1,n):
        for j in range(1,n):
            for k in range(1,n):
                if i+j+k == x and (not i==j==k):
                    goukei += 1

    print(goukei)

Failing test case input:
12 6
0 0

Expected output:
1


Actual output:
9


Fixed submission (verdict: Accepted):
while True:
    n,x = [int(i) for i in input().split()]
    if n==x==0:break
    count=0

    for i in range(1,n+1):
        for j in range(1,n):
            for k in range(1,n-1):
                if i+j+k==x and i>j>k and not i==j==k:
                    count += 1
    print(count)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
while True :
    n, x = map(int, input().split())
    if (n == x == 0) :
        break

    count = 0
    for a in range (1, n) :
        for b in range (2, n) :
            for c in range (3, n) :
                Sum = a + b + c
                if (Sum == x) :
                    count += 1
    print(count)

Failing test case input:
10 19
0 0

Expected output:
9


Actual output:
41


Fixed submission (verdict: Accepted):
while True:
    n, x = map(int, input().split())
    if (n == x == 0):
        break

    count = 0
    for a in range(1, x 
        for b in range(a + 1, x 
            for c in range(b + 1, n + 1):
                Sum = a + b + c
                if (Sum == x):
                    count += 1 
    print(count)

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

while n != 0 and x != 0:
    test = [[i,j,k] for i in range(1, n+1) for j in range(i+1, n+1) for k in range(j+1, n+1) if i + j + k == x]
    print(len(test))
    n, x = [int(i) for i in input().split()]


Failing test case input:
4 0
0 0

Expected output:
0


Actual output:

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

while not (n == 0 and x == 0):
    test = [[i,j,k] for i in range(1, n+1) for j in range(i+1, n+1) for k in range(j+1, n+1) if i + j + k == x]
    print(len(test))
    n, x = [int(i) for i in input().split()]
Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    n, x = [int(a) for a in input().split()]
    if n == x == 0:
        break
    cnt = 0
    for i in range(1, n):
        for j in range(i + 1, n):
            flag = False
            for k in range(j + 1, n + 1):
                if flag:
                    break
                if (i + j + k) == x:
                    cnt += 1
                    print("{0} + {1} + {2}".format(i, j, k))
                    flag = True

    print(cnt)

Failing test case input:
6 13
0 0

Expected output:
2


Actual output:
2 + 5 + 6
3 + 4 + 6
2


Fixed submission (verdict: Accepted):
while True:
    n, x = [int(a) for a in input().split()]
    if n == x == 0:
        break
    cnt = 0
    for i in range(1, n):
        for j in range(i + 1, n):
            flag = False
            for k in range(j + 1, n + 1):
                if flag:
                    break
                if (i + j + k) == x:
                    cnt += 1
                    flag = True

    print(cnt)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
while True :
    num = 0
    n,x = map(int,input().split())
    if(n==0 and x==0): break
    for i in range (n) :
        s = x - n - i
        if(i<s<x):
            num += 1
    print(num)


Failing test case input:
3 6
0 0

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
while True :
    num = 0
    n,x = map(int,input().split())
    if(n==0 and x==0): break
    for i in range (1,n) :
        for j in range(1,i):
            s = x - j - i
            if(s<=n and j<i and i<s):
                num += 1
    print(num)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):



























result = []
n=[]
x=[]

while 1:
	temp = input().split() 
	if temp[0]=="0" and temp[1]=="0":
		break;
	else:
		n.append( int( temp[0] ))
		x.append( int( temp[1] ))

for i in range( len(n) ):
	count =0
	for n1 in range(1,n[i]+1-2):
		for n2 in range(n1+1, n[i]+1-1):
			for n3 in range(n2+1, n[i]+1):
				sum = n1+n2+n3
				if sum == x[i]:
					count+=1
	result.append(count)

for i in range( len(result)-1 ):
	print("{0} ".format(result[i]), end="")



Failing test case input:
3 14
0 0

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):



























result = []
n=[]
x=[]

while 1:
	temp = input().split() 
	if temp[0]=="0" and temp[1]=="0":
		break;
	else:
		n.append( int( temp[0] ))
		x.append( int( temp[1] ))

for i in range( len(n) ):
	count =0
	for n1 in range(1,n[i]+1-2):
		for n2 in range(n1+1, n[i]+1-1):
			for n3 in range(n2+1, n[i]+1):
				sum = n1+n2+n3
				if sum == x[i]:
					count+=1
	result.append(count)

for i in range( len(result) ):
	print(result[i])
Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):

i=0
while(True):
    a=list(map(int,input().split()))
    if(a[0]==0 and a[1]==0):
        break
    for x in range(2,a[0]):
        sum=a[1]-x
        for y in range(2,x):
            if (sum-y<a[0]):
                i+=1
    print(i)

Failing test case input:
5 6
0 0

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):

while(True):
    i=0
    a=list(map(int,input().split()))
    if(a[0]==0 and a[1]==0):
        break
    for x in range(2,a[0]):
        sum=a[1]-x
        for y in range(1,x):
            if (sum-y<a[0]+1 and sum-y>x):
                i+=1
    print(i)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
array = []
num = 0
while True :
    n = input()
    if n == "0 0":
        break
    array.append(n.split())
for i in range(len(array)):
    n = int(array[i][0])
    x = int(array[i][1])
    yeah = x
    for i2 in range(n):
        yeah -=n-i2
        yeah -=n-(i2+1)
        if yeah > 0 and yeah <= n and n-(i2+1) > 0:
            num +=1
        yeah = x
print(num)

Failing test case input:
3 4
0 0

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
array = []
while 1 :
    n = input()
    if n == "0 0":
        break
    array.append(n.split())
for i in range(len(array)):
    count = 0
    for i2 in range(1,int(array[i][0])+1):
        for i3 in range(i2+1,int(array[i][0])+1):
            number =int(array[i][1])-(i2+i3)
            if number > i3 and number <= int(array[i][0]):
                count += 1
    print(count)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
while(1):
    n, x = map(int, input().split())

    if n == 0 and x == 0:
        break

    count = 0
    for i in range(1, n-1):
        if i*3 > x:
            break
        for j in range(i+1, n):
            if i+2*j < x:
                break
            if x-i-j <= n:
                count += 1

    print(count)

Failing test case input:
6 9
0 0

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
while(1):
    n, x = map(int, input().split())

    if n == 0 and x == 0:
        break

    count = 0
    for i in range(1, n-1):
        if i*3 >= x:
            break
        for j in range(i+1, n):
            if i+2*j >= x:
                break
            if x-i-j <= n:
                count += 1

    print(count)
Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
x=1
y=1
list=[]
while x>0:
    if x ==0 and y == 0:
        break
    x,y = map(int,input().split())
    list.append([x,y])

for L in list:
    ans = 0
    for i in range(1,L[0]-1):
        for j in range(i+1,L[0]):
            for k in range(j+1,L[0]+1):
                if L[1]== i + j+ k:
                    ans += 1
                else:
                    pass
    print(ans)

Failing test case input:
6 9
0 0

Expected output:
3


Actual output:
3
0


Fixed submission (verdict: Accepted):
x=1
y=1
list=[]
while x>0:
    if x ==0 and y == 0:
        break
    x,y = map(int,input().split())
    list.append([x,y])

list.remove([0,0])

for L in list:
    ans = 0
    for i in range(1,L[0]-1):
        for j in range(i+1,L[0]):
            for k in range(j+1,L[0]+1):
                if L[1]== i + j+ k:
                    ans += 1
                else:
                    pass
    print(ans)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    (n,x) = [int(i) for i in input().split()]
    if n==x==0:
        break

    goukei = 0
    for i in range(1,n):
        for j in range(1,n):
            for k in range(1,n):
                if i+j+k == x:
                    goukei += 1

    print(goukei)

Failing test case input:
7 6
0 0

Expected output:
1


Actual output:
10


Fixed submission (verdict: Accepted):
while True:
    n,x = [int(i) for i in input().split()]
    if n==x==0:break
    count=0

    for i in range(1,n+1):
        for j in range(1,n):
            for k in range(1,n-1):
                if i+j+k==x and i>j>k and not i==j==k:
                    count += 1
    print(count)

Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):



























result = []
n=[]
x=[]

while 1:
	temp = input().split() 
	if temp[0]=="0" and temp[1]=="0":
		break;
	else:
		n.append( int( temp[0] ))
		x.append( int( temp[1] ))

for i in range( len(n) ):
	count =0
	for n1 in range(1,n[i]+1-2):
		for n2 in range(n1+1, n[i]+1-1):
			for n3 in range(n2+1, n[i]+1):
				sum = n1+n2+n3
				if sum == x[i]:
					count+=1
	result.append(count)

for i in range( len(result) ):
	print("{0} ".format(result[i]), end="")
	if i == len(result)-1:
		print(result[i])

Failing test case input:
16 25
0 0

Expected output:
28


Actual output:
28 28


Fixed submission (verdict: Accepted):



























result = []
n=[]
x=[]

while 1:
	temp = input().split() 
	if temp[0]=="0" and temp[1]=="0":
		break;
	else:
		n.append( int( temp[0] ))
		x.append( int( temp[1] ))

for i in range( len(n) ):
	count =0
	for n1 in range(1,n[i]+1-2):
		for n2 in range(n1+1, n[i]+1-1):
			for n3 in range(n2+1, n[i]+1):
				sum = n1+n2+n3
				if sum == x[i]:
					count+=1
	result.append(count)

for i in range( len(result) ):
	print(result[i])
Problem: p02412
Buggy submission (Python3, verdict: Wrong Answer):
n, x = map(int, input().split())
cnt = 0
for i in range(n):
    if i >= x-3:break
    for j in range(i+1,n):
        for k in range(j+1, n):
            if i+j+k == x:
                cnt += 1
print(cnt)


Failing test case input:
14 7
0 0

Expected output:
1


Actual output:
4


Fixed submission (verdict: Accepted):
while 1:
    n, x = map(int, input().split())
    if n == x == 0:
        break
    cnt = 0
    for i in range(1,n+1):
        for j in range(i+1,n+1):
            for k in range(j+1, n+1):
                if i+j+k == x:
                    cnt += 1
    print(cnt)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve():
    x, y = map(int, input().split())
    ans = 0
    if x == 1:
        ans += 300000
    elif x == 2:
        ans += 200000
    else:
        ans += 100000
    if y == 1:
        ans += 300000
    elif y == 2:
        ans += 200000
    else:
        ans += 100000
    if x == 1 and y == 1:
        ans += 400000
    print(ans)
    


if __name__ == '__main__':
    solve()

Failing test case input:
31 24

Expected output:
0


Actual output:
200000


Fixed submission (verdict: Accepted):
def solve():
    x, y = map(int, input().split())
    ans = 0
    if x == 1:
        ans += 300000
    elif x == 2:
        ans += 200000
    elif x == 3:
        ans += 100000
    if y == 1:
        ans += 300000
    elif y == 2:
        ans += 200000
    elif y == 3:
        ans += 100000
    if x == 1 and y == 1:
        ans += 400000
    print(ans)



if __name__ == '__main__':
    solve()

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = [int(x) for x in input().split()]
won = 0
if a in range(1, 4):
  won  += [0,300000,200000,200000][a]
if b in range(1, 4):
  won  += [0,300000,200000,100000][b]
if a == 1 and b == 1:won += 400000  

print(won)

Failing test case input:
3 21

Expected output:
100000


Actual output:
200000


Fixed submission (verdict: Accepted):
a, b = [int(x) for x in input().split()]
won = 0
if a in range(1, 4):
  won  += [0,300000,200000,100000][a]
if b in range(1, 4):
  won  += [0,300000,200000,100000][b]
if a == 1 and b == 1:won += 400000  
 
print(won)

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

def get_money(num):
    if num==3:
        return 100000
    elif num==2:
        return 200000
    else:
        return 300000
x,y=map(int,input().split())
money=get_money(x)+get_money(y)
if x==y and x==1:
    money+=400000
print(money)

Failing test case input:
57 24

Expected output:
0


Actual output:
600000


Fixed submission (verdict: Accepted):

def get_money(num):
    if num==3:
        return 100000
    elif num==2:
        return 200000
    elif num==1:
        return 300000
    else:
        return 0
x,y=map(int,input().split())
money=get_money(x)+get_money(y)
if x==y and x==1:
    money+=400000
print(money)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = [int(n) for n in input().split()]
V = {0: 400000, 1: 300000, 2: 200000, 3: 100000}
ans = 0
for i in [X, Y]:
    ans += V.setdefault(i, 0)
print(ans+V[0] if (X and Y ) == 1 else ans)


Failing test case input:
6 001

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
X, Y = [int(n) for n in input().split()]
V = {0: 400000, 1: 300000, 2: 200000, 3: 100000}
ans = 0
for i in [X, Y]:
    ans += V.setdefault(i, 0)
print(ans+V[0] if X==1==Y else ans)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A ,B = map(int,(input().split()))
one = 300000
two = 200000
three = 100000
result = 0
if A == 1 and B == 1:
    print(one + one + 400000)
    exit(0)
if A == 3 :
    result += three
if A == 2:
    result += two
if B == 3:
    result += three
if B == 2:
    result += two
print(result)


Failing test case input:
11 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
A ,B = map(int,(input().split()))
one = 300000
two = 200000
three = 100000
result = 0
if A == 1 and B == 1:
    print(one + one + 400000)
    exit(0)
if A == 3:
    result += three
if A == 2:
    result += two
if A == 1:
    result += one
if B == 3:
    result += three
if B == 2:
    result += two
if B == 1:
    result += one
print(result)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
if x + y == 2:
  print(1000000)
elif x + y == 3:
  print(500000)
elif x + y == 5:
  print(300000)
elif x + y == 4:
  print(400000)
elif x + y == 6:
  print(200000)
elif x + y >=5 and min(x,y) == 1:
  print(300000)
elif x + y >=5 and min(x,y) == 2:
  print(200000)
elif x + y >=5 and min(x,y) == 3:
  print(1000000000)
else:
  print(0)

Failing test case input:
3 21

Expected output:
100000


Actual output:
1000000000


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
if x + y == 2:
  print(1000000)
elif x + y == 3:
  print(500000)
elif x + y == 5:
  print(300000)
elif x + y == 4:
  print(400000)
elif x + y == 6:
  print(200000)
elif x + y >=5 and min(x,y) == 1:
  print(300000)
elif x + y >=5 and min(x,y) == 2:
  print(200000)
elif x + y >=5 and min(x,y) == 3:
  print(100000)
else:
  print(0)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
ans=0
if a<=3:
    ans+=(4-a)*10**5
if b<=3:
    ans+=(4-a)*10**5
if a==b==1:
    ans+=4*10**5
print(ans)

Failing test case input:
57 1

Expected output:
300000


Actual output:
-5300000


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
ans=0
if a<=3:
    ans+=(4-a)*10**5
if b<=3:
    ans+=(4-b)*10**5
if a==b==1:
    ans+=4*10**5
print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
ans = 0

if X <= 3:
    ans += (4 - X) * 10 ** 5

if Y <= 3:
    ans += (4 - X) * 10 ** 5

if X == Y == 1:
    ans += 4 * 10 ** 5

print(ans)


Failing test case input:
6 001

Expected output:
300000


Actual output:
-200000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
ans = 0

if X <= 3:
    ans += (4 - X) * 10 ** 5

if Y <= 3:
    ans += (4 - Y) * 10 ** 5

if X == Y == 1:
    ans += 4 * 10 ** 5

print(ans)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())

sumPriz = 0

if X == 1:
    sumPriz += 300000
elif X == 2:
    200000
elif X == 3:
    100000

if Y == 1:
    sumPriz += 300000
    if X == 1:
        sumPriz += 400000
elif Y == 2:
    200000
elif Y == 3:
    100000

print(sumPriz)

Failing test case input:
2 122

Expected output:
200000


Actual output:
0


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())

sumPriz = 0

if X == 1:
    sumPriz += 300000
elif X == 2:
    sumPriz += 200000
elif X == 3:
    sumPriz += 100000

if Y == 1:
    sumPriz += 300000
    if X == 1:
        sumPriz += 400000
elif Y == 2:
    sumPriz += 200000
elif Y == 3:
    sumPriz += 100000

print(sumPriz)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
m = {3:100000, 2:200000, 1:300000}
def f(a):
    if a <= 3:
        return m[a]
    return 0
x, y = map(int, input().split())
print(f(x) + f(y) + (x or y) * 400000)

Failing test case input:
37 52

Expected output:
0


Actual output:
14800000


Fixed submission (verdict: Accepted):
m = {3:100000, 2:200000, 1:300000}
def f(a):
    if a <= 3:
        return m[a]
    return 0
def g(a, b):
    return 400000 if (a == 1 and a == b) else 0
x, y = map(int, input().split())
print(f(x) + f(y) + g(x, y))

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = input().split()
s = 0
if x == 1:
    s += 300000
elif x == 2:
    s += 200000
elif x == 3:
    s += 100000
else:
    s += 0
if y == 1:
    s += 300000
elif y == 2:
    s += 200000
elif y == 3:
    s += 100000
else:
    s += 0
if x == 1 and y == 1:
    s += 400000
print(s)

Failing test case input:
3 21

Expected output:
100000


Actual output:
0


Fixed submission (verdict: Accepted):
x, y = input().split()
s = 0
if int(x) == 1:
    s += 300000
elif int(x) == 2:
    s += 200000
elif int(x) == 3:
    s += 100000
else:
    s += 0
if int(y) == 1:
    s += 300000
elif int(y) == 2:
    s += 200000
elif int(y) == 3:
    s += 100000
else:
    s += 0
if int(x) == 1 and int(y) == 1:
    s += 400000
print(s)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main(x: int, y: int):
    award = 0

    if (x and y) == 1:
        award += 400000

    for i in [x, y]:
        if i == 1:
            award += 300000
        elif i == 2:
            award += 200000
        elif i == 3:
            award += 100000

    print(award)


if __name__ == "__main__":
    x, y = map(int, input().split())

    main(x, y)


Failing test case input:
6 001

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
def main(x: int, y: int):
    award = 0

    if x == y == 1:
        award += 400000

    for i in [x, y]:
        if i == 1:
            award += 300000
        elif i == 2:
            award += 200000
        elif i == 3:
            award += 100000

    print(award)


if __name__ == "__main__":
    x, y = map(int, input().split())

    main(x, y)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
 
prices = {1: 300000, 2: 200000, 3: 1000000}
 
ans = 0
if X < 4:
    ans += prices[X]
 
if Y < 4:
    ans += prices[Y]
 
if Y == 1 and X == 1:
    ans += 400000
 
print(ans)


Failing test case input:
3 21

Expected output:
100000


Actual output:
1000000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
 
prices = {1: 300000, 2: 200000, 3: 100000}
 
ans = 0
if X < 4:
    ans += prices[X]
 
if Y < 4:
    ans += prices[Y]
 
if Y == 1 and X == 1:
    ans += 400000
 
print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
get=0
if x==1 or y==1:
    get+=300000
if x==2 or y==1:
    get+=200000
if x==3 or y==1:
    get+=100000
if x==1 & y==1:
    get+=400000
print(get)

Failing test case input:
11 001

Expected output:
300000


Actual output:
600000


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
get=0
if x==1:
    get+=300000
if y==1:
    get+=300000
if x==2:
    get+=200000
if y==2:
    get+=200000
if x==3:
    get+=100000
if y==3:
    get+=100000
if x==1 and y==1:
    get+=400000
print(get)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = input().split()
price = 0
if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
    if int(x) == 1 or int(y) == 1:
        price += 400000
    if int(x) == 1:
        price += 300000
    elif int(x) == 2:
        price += 200000
    elif int(x) == 3:
        price += 100000
    if int(y) == 1:
        price += 300000
    elif int(y) == 2:
        price += 200000
    elif int(y) == 3:
        price += 100000

print(price)

Failing test case input:
57 1

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
x, y = input().split()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 and int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())
lis = [0]*205
lis[0] == 30000
lis[1] == 20000
lis[2] == 10000
if n == m and n == 1:
  print(1000000)
else:
  print(lis[n-1]+lis[m-1])

Failing test case input:
6 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())
lis = [0]*205
lis[0] = 300000
lis[1] = 200000
lis[2] = 100000
if n == m and n == 1:
  print(1000000)
else:
  print(lis[n-1]+lis[m-1])
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y=map(int,input().split())

ttl=0
if(x>3 and y>3):
  ttl=0
else:
  for i in range(1,4):
    ttl=(4-i)*100000
    for j in range(1,4):
        ttl=ttl+(4-j)*100000
        break
  if ttl==600000:
    ttl=ttl+400000
print(ttl)


Failing test case input:
57 1

Expected output:
300000


Actual output:
400000


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())

ttl=0
if(x>3 and y>3):
  ttl=0
else:
  for i in range(1,4):
    if i==x:
        ttl=(4-i)*100000
        break
  for j in range(1,4):
    if j==y:
        ttl=ttl+(4-j)*100000
        break
  if ttl==600000:
    ttl=ttl+400000
print(ttl)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X,Y = input().split()
X = int(X)
Y = int(Y)
S = 0
s = [300000,200000,100000]
try:
    S += s[X-1]
    S += s[Y-1]
except:
    pass
if X == 1 and Y == 1:
    S += 400000
print(S)

Failing test case input:
11 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
X,Y = input().split()
X = int(X)
Y = int(Y)
S = 0
s = [300000,200000,100000]
if X <= 3:
    S += s[X-1]
if Y <= 3:
    S += s[Y-1]
if X == 1 and Y == 1:
    S += 400000
print(S)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int,input().split())

ans = max(X-4,0)* 100000 + max(Y-4,0)* 100000
if X == Y == 1:
  ans += 400000
print(ans)

Failing test case input:
57 43

Expected output:
0


Actual output:
9200000


Fixed submission (verdict: Accepted):

X, Y = map(int,input().split())

ans = max(4-X,0)* 100000 + max(4-Y,0)* 100000
if (X == Y) *  (Y== 1):
  ans += 400000
print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
c = 0
if a == 3:
    c += 1
elif a == 2:
    c += 2
elif a == 1:
    c += 3

if b == 3:
    c += 1
elif b == 2:
    c += 2
elif b == 1:
    c += 3

if a == b == 1:
    c += 4

Failing test case input:
12 122

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
c = 0
if a == 3:
    c += 1
elif a == 2:
    c += 2
elif a == 1:
    c += 3

if b == 3:
    c += 1
elif b == 2:
    c += 2
elif b == 1:
    c += 3

if a == b == 1:
    c += 4

print(c*100000)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = input().split()
addi = 0
price = 0
if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
    if int(x) == 1 or int(y) == 1:
        addi = 400000
    if int(x) == 1:
        price += 300000
    elif int(x) == 2:
        price += 200000
    elif int(x) == 3:
        price += 100000
    if int(y) == 1:
        price += 300000
    elif int(y) == 2:
        price += 200000
    elif int(y) == 3:
        price += 100000

print(price + addi)

Failing test case input:
57 1

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
x, y = input().split()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 and int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
prise = 0
for i in range(1,4):
  if x == i:
    prise += 300000 
  if y == i:
    prise += 300000 
if x + y == 2:
  prise += 400000

print(prise)

Failing test case input:
2 122

Expected output:
200000


Actual output:
300000


Fixed submission (verdict: Accepted):
xy = list(map(int,input().split()))
prise = 0

for i in xy:
  if i == 1:
    prise += 300000
  elif i == 2:
    prise += 200000
  elif i == 3:
    prise += 100000

if sum(xy) == 2:
  prise += 400000

print(prise)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
codePlace, implePlace = map(int, input().split(" "))

priceDict = {
    "1":300000,
    "2":200000,
    "3":100000
}

totalPrice = priceDict[codePlace] if codePlace in priceDict.keys() else 0
totalPrice += priceDict[implePlace] if implePlace in priceDict.keys() else 0
totalPrice += 400000 if codePlace == 1 and implePlace == 1 else 0

print(totalPrice)


Failing test case input:
3 21

Expected output:
100000


Actual output:
0


Fixed submission (verdict: Accepted):
codePlace, implePlace = map(int, input().split(" "))

priceDict = {
    1:300000,
    2:200000,
    3:100000
}

totalPrice = priceDict[codePlace] if codePlace in priceDict.keys() else 0
totalPrice += priceDict[implePlace] if implePlace in priceDict.keys() else 0
totalPrice += 400000 if codePlace == 1 and implePlace == 1 else 0

print(totalPrice)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
c = 0
if a == 3:
    c += 1
elif a == 2:
    c += 2
elif a == 1:
    c += 3

if b == 3:
    c += 1
elif b == 2:
    b += 2
elif a == 1:
    b += 3

if a == b == 1:
    c += 4

print(c*100000)

Failing test case input:
11 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
c = 0
if a == 3:
    c += 1
elif a == 2:
    c += 2
elif a == 1:
    c += 3

if b == 3:
    c += 1
elif b == 2:
    c += 2
elif b == 1:
    c += 3

if a == b == 1:
    c += 4

print(c*100000)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y=map(int,input().split())
ans=max(0,8-(x+y))
if ans==6:
  ans+=4
print(ans*100000)

Failing test case input:
11 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
ans=max(0,4-x)+max(0,4-y)
if ans==6:
  ans+=4
print(ans*100000)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
s=[0,]
d={
  1:30000,
  2:20000,
  3:10000,
}

if x in d:
  s.append(d[x])

if y in d:
  s.append(d[y])

if x==1 and y==1:
  s.append(40000)
  
print(sum(s))


Failing test case input:
57 1

Expected output:
300000


Actual output:
30000


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
s=[0,]
d={
  1:300000,
  2:200000,
  3:100000,
}

if x in d:
  s.append(d[x])

if y in d:
  s.append(d[y])

if x==1 and y==1:
  s.append(400000)
  
print(sum(s))

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

if a+b==2:
  print(1000000)
else:
  ans =0
  if a<=3:
    ans+= (4-a)*100000
  if b<=3:
    ans+= (4-a)*100000
  print(ans)

Failing test case input:
6 001

Expected output:
300000


Actual output:
-200000


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

if a+b==2:
  print(1000000)
else:
  ans =0
  if a<=3:
    ans+= (4-a)*100000
  if b<=3:
    ans+= (4-b)*100000
  print(ans)

Problem: p02853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x,y = map(int,input().split())
ans = 0
if x == 1 and y == 1:
  print(1000000)
elif x < 4 and y > 3:
  ans += 100000*(4-x)
elif x > 3 and y < 4:
  ans += 100000*(4-y)
elif x < 4 and y < 4:
  ans += 100000*(8-x-y)
else:
  print(0)
print(ans)

Failing test case input:
37 52

Expected output:
0


Actual output:
0
0


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
if x == 1 and y == 1:
  print(1000000)
elif x < 4 and y > 3:
  print(100000*(4-x))
elif x > 3 and y < 4:
  print(100000*(4-y))
elif x < 4 and y < 4:
  print(100000*(8-x-y))
else:
  print(0)
Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
X, Y = map(int, input().split())

shokin = [300000, 200000, 100000]

total = 0
if X <= 3:
  total += shokin[X-1]
  if Y <= 3:
    total += shokin[Y-1]
  if X == 1 and Y == 1:
    total += 400000

print(total)

Failing test case input:
11 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())

shokin = [300000, 200000, 100000]

total = 0
if X <= 3:
  total += shokin[X-1]
if Y <= 3:
  total += shokin[Y-1]
if X == 1 and Y == 1:
  total += 400000

print(total)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
en = list(map(int,input().split()))
sum = 0
for i in range(2):
	if en[i] == 1:
		sum += 30000
	elif en[i] == 2:
		sum += 20000;
	elif en[i] == 3:
		sum +=10000;
if en[0] ==1 and en[1] == 1:
	sum += 40000
print(sum)

Failing test case input:
11 001

Expected output:
300000


Actual output:
30000


Fixed submission (verdict: Accepted):
en = list(map(int,input().split()))
sum = 0
for i in range(2):
	if en[i] == 1:
		sum += 300000;
	elif en[i] == 2:
		sum += 200000;
	elif en[i] == 3:
		sum +=100000;
if en[0] ==1 and en[1] == 1:
	sum += 400000
print(sum)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
a = 0
if X == 1:
  a += 300000
elif X == 2:
  a += 200000
elif X == 3:
  a += 10000

if Y == 1:
  a += 300000
elif Y == 2:
  a += 200000
elif Y == 3:
  a += 100000

if X == 1 and Y == 1:
  a += 400000
print(a)


Failing test case input:
3 21

Expected output:
100000


Actual output:
10000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
a = 0
if X == 1:
  a += 300000
elif X == 2:
  a += 200000
elif X == 3:
  a += 100000

if Y == 1:
  a += 300000
elif Y == 2:
  a += 200000
elif Y == 3:
  a += 100000

if X == 1 and Y == 1:
  a += 400000
print(a)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = list(map(int, input().split()))
r=[300000, 200000, 100000]
ra=0
if a+b==2:
  print('1000000')
else:
    if a<3:
      ra += r[a]
    if b<3:
      ra += r[b]
 
print(ra)

Failing test case input:
11 001

Expected output:
300000


Actual output:
200000


Fixed submission (verdict: Accepted):
a,b = list(map(int, input().split()))
r=[300000, 200000, 100000]
ra=0
if a+b==2:
  print('1000000')
else:
    if a<4:
      ra += r[a-1]
    if b<4:
      ra += r[b-1]
    print(ra)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h = list(map(int, input().split()))
a = 0
for i in range(2):
  if h[i] << 4:
    a = a + 100000 * (4-h[i])
if h[0] == 1 and h[1] == 1:
  a = a + 400000
print(a)
    

Failing test case input:
17 10

Expected output:
0


Actual output:
-1900000


Fixed submission (verdict: Accepted):
h = list(map(int, input().split()))
a = 0
for i in range(2):
  if h[i] <= 3:
    a = a + 100000 * (4-h[i])
if h[0] == 1 and h[1] == 1:
  a = a + 400000
print(a)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = 1
x, y = [0]*N, [0]*N
l = list(range(N))
sum=0


for i in range(N):
  x[i], y[i] = map(int, input().split())

if x[0] <= 3:
   sum=sum+10000*(4-x[0])
else:
    pass

if y[0]<= 3:
   sum=sum+10000*(4-y[0])
else:
    pass

if x[0]==1 and y[0]==1:
    sum=sum+40000

else:
    pass

print(sum)


Failing test case input:
6 001

Expected output:
300000


Actual output:
30000


Fixed submission (verdict: Accepted):

import itertools
import math
N = 1
x, y = [0]*N, [0]*N
l = list(range(N))
sum=0


for i in range(N):
  x[i], y[i] = map(int, input().split())

if x[0] <= 3:
   sum=sum+100000*(4-x[0])
else:
    pass

if y[0]<= 3:
   sum=sum+100000*(4-y[0])
else:
    pass

if x[0]==1 and y[0]==1:
    sum=sum+400000

else:
    pass

print(sum)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
ans = 0

if x == 1 :
    ans = 300000
elif x == 2:
    ans = 200000
elif x == 3:
    ans = 100000


if y == 1:
    ans += 300000
elif y == 2:
    ans += 200000
elif y == 3:
    ans += 100000


if x == 1:
    ans += 400000
if y == 1:
    ans += 400000
print(ans)


Failing test case input:
11 001

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
ans = 0

if x == 1 :
    ans = 300000
elif x == 2:
    ans = 200000
elif x == 3:
    ans = 100000


if y == 1:
    ans += 300000
elif y == 2:
    ans += 200000
elif y == 3:
    ans += 100000


if x == 1 and y == 1:
    ans += 400000

print(ans)

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


X, Y = map(int, input().split())

sum = 0
if(X == 1):
  sum = 300000
elif(X == 2):
  sum = 200000
elif(X == 3):
  sum = 10000

if(Y == 1):
  sum += 300000
elif(Y == 2):
  sum += 200000
elif(Y == 3):
  sum += 100000

if(X == 1 and Y == 1):
  sum += 400000

print(int(sum))


Failing test case input:
3 21

Expected output:
100000


Actual output:
10000


Fixed submission (verdict: Accepted):


X, Y = map(int, input().split())

sum = 0
if(X == 1):
  sum = 300000
elif(X == 2):
  sum = 200000
elif(X == 3):
  sum = 100000

if(Y == 1):
  sum += 300000
elif(Y == 2):
  sum += 200000
elif(Y == 3):
  sum += 100000

if(X == 1 and Y == 1):
  sum += 400000

print(sum)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y=map(int,input().split())
ans=0
if x<=3:
    ans+=(4-x)*100000
if y<=3:
    ans+=(4-x)*100000
if ans==600000:
    ans=1000000
print(ans)

Failing test case input:
6 001

Expected output:
300000


Actual output:
-200000


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
ans=0
if x<=3:
    ans+=(4-x)*100000
if y<=3:
    ans+=(4-y)*100000
if ans==600000:
    ans=1000000
print(ans)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X,Y = map(int,input().split())
total = 0

if X <= 3:
  total += (4 - X) * 100000
if Y <= 3:
  total += (4 - X) * 100000
if X==1 and Y==1:
  total += 400000
  
print(total)

Failing test case input:
6 001

Expected output:
300000


Actual output:
-200000


Fixed submission (verdict: Accepted):
X,Y = map(int,input().split())
total = 0

if X <= 3:
  total += (4 - X) * 100000
if Y <= 3:
  total += (4 - Y) * 100000
if X==1 and Y==1:
  total += 400000
  
print(total)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = input().split()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 or int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)

Failing test case input:
57 1

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
x, y = input().split()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 and int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = (int(x) for x in input().split())

if x>3 & y>3:
    print(0)
elif x<=3 & y<=3:
    if x+y == 2:
        print(1000000)
    elif x+y == 3:
        print(500000)
    elif x+y == 4:
        print(400000)
    elif x+y == 5:
        print(300000)
    else:
        print(200000)
else:
    z = min(x,y)
    if z == 1:
        print(300000)
    elif z == 2:
        print(200000)
    else:
        print(100000)

Failing test case input:
31 33

Expected output:
0


Actual output:
100000


Fixed submission (verdict: Accepted):
x,y = (int(x) for x in input().split())

if x>3 and y>3:
    print(0)
elif x<=3 and y<=3:
    if x+y == 2:
        print(1000000)
    elif x+y == 3:
        print(500000)
    elif x+y == 4:
        print(400000)
    elif x+y == 5:
        print(300000)
    else:
        print(200000)
else:
    z = min(x,y)
    if z == 1:
        print(300000)
    elif z == 2:
        print(200000)
    else:
        print(100000)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y=map(int,input().split())
list=[300000,200000,100000]
if x==1 and y==1:
    print(2*300000+400000)
elif x<4 and y<4:
    print(list[x-1]+list[y-1])
else:
    print(0)

Failing test case input:
2 122

Expected output:
200000


Actual output:
0


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
list=[300000,200000,100000,0]
if x>4:
    x=4
if y>4:
    y=4
if x==1 and y==1:
    print(2*300000+400000)
else:
    print(list[x-1]+list[y-1])

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
if X == 1:
    x = 30000
elif X == 2:
    x = 20000
elif X == 3:
    x = 10000
else:
    x = 0

if Y == 1:
    y = 30000
elif Y == 2:
    y = 20000
elif Y == 3:
    y = 10000
else:
    y = 0


if X == 1 and Y == 1:
    print(1000000)
else:
    print(x+y)

Failing test case input:
11 001

Expected output:
300000


Actual output:
30000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
if X == 1:
    x = 300000
elif X == 2:
    x = 200000
elif X == 3:
    x = 100000
else:
    x = 0

if Y == 1:
    y = 300000
elif Y == 2:
    y = 200000
elif Y == 3:
    y = 100000
else:
    y = 0


if X == 1 and Y == 1:
    print(1000000)
else:
    print(x+y)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y=map(int,input().split())
ans=0

if x<=3:
  if x==1:
    ans+=300000
  elif x==2:
    ans+=200000
  else:
    ans+=100000

if y<=3:
  if x==1:
    ans+=300000
  elif x==2:
    ans+=200000
  else:
    ans+=100000
    
if x==1 and y==1:
  ans+=400000
  
print(ans)

Failing test case input:
6 001

Expected output:
300000


Actual output:
100000


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
ans=0

if x==1:
  ans+=300000
elif x==2:
  ans+=200000
elif x==3:
  ans+=100000

if y==1:
  ans+=300000
elif y==2:
  ans+=200000
elif y==3:
  ans+=100000
    
if x==1 and y==1:
  ans+=400000
  
print(ans)

Problem: p02853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=map(int,input().split())
lst={0:0,1:300000,2:200000,3:1000000}
if a>3:
    x=0
else:
    x=a
if b>3:
    y=0
else:
    y=b
if x==1 and y==1:
    ans=1000000
else :
    ans=lst[x]+lst[y]


print(ans)

Failing test case input:
3 21

Expected output:
100000


Actual output:
1000000


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
lst={0:0,1:300000,2:200000,3:100000}
if a>3:
    x=0
else:
    x=a
if b>3:
    y=0
else:
    y=b
if x==1 and y==1:
    ans=1000000
else :
    ans=lst[x]+lst[y]


print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
res = 0
if x <= 3:
    res += 300000 
if y <= 3:
    res += 300000 
if x ==1 and y == 1:
    res += 400000

print(res)

Failing test case input:
3 21

Expected output:
100000


Actual output:
300000


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
res = 0
if x <= 3:
    res += 400000 - (x*100000) 
if y <= 3:
    res += 400000 - (y*100000)
if x ==1 and y == 1:
    res += 400000

print(res)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
sum = 0
if x < 4:
  sum += (4-x) * 100000
if y < 4:
  sum += (4-y) * 100000
if x == 1 and y == 1:
  sum += 4 * 100000
  print(sum)

Failing test case input:
63 22

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
sum = 0
if x < 4:
  sum += (4-x) * 100000
if y < 4:
  sum += (4-y) * 100000
if x == 1 and y == 1:
  sum += 4 * 100000
print(sum)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=0
for i in map(int, input().split()):
    if i==1:
        s+=300000
    elif i==2:
        s+200000
    elif i==3:
        s+=100000
if s==600000:
    s+=400000
print(s)

Failing test case input:
2 122

Expected output:
200000


Actual output:
0


Fixed submission (verdict: Accepted):
s = 0
for i in map(int, input().split()):
    if i==1:
        s+=300000
    elif i==2:
        s+=200000
    elif i==3:
        s+=100000
if s==600000:
    s=1000000
print(s)

Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

x, y = IL()

if x == y == 1:
  print(1000000)
  exit()

ans = 0
if x == 1:
  ans += 300000
elif x == 2:
  ans += 200000
elif x == 3:
  ans += 100000

if y == 1:
  ans += 400000
print(ans)

Failing test case input:
11 001

Expected output:
300000


Actual output:
400000


Fixed submission (verdict: Accepted):
import sys
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

x, y = IL()

if x == y == 1:
  print(1000000)
  exit()

ans = 0
if x == 1:
  ans += 300000
elif x == 2:
  ans += 200000
elif x == 3:
  ans += 100000

if y == 1:
  ans += 300000
elif y == 2:
  ans += 200000
elif y == 3:
  ans += 100000
print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
m = {3:100000, 2:200000, 1:300000}
def f(a):
    if a <= 3:
        return m[a]
    return 0
x, y = map(int, input().split())
print(f(x) + f(y) + ((x & y) != 0) * 400000)

Failing test case input:
21 14

Expected output:
0


Actual output:
400000


Fixed submission (verdict: Accepted):
m = {3:100000, 2:200000, 1:300000}
def f(a):
    if a <= 3:
        return m[a]
    return 0
def g(a, b):
    return 400000 if (a == 1 and a == b) else 0
x, y = map(int, input().split())
print(f(x) + f(y) + g(x, y))

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
ans = max(0,4-x) + max(0,3-y)
if x==1==y: ans += 4
print(ans*100000)

Failing test case input:
11 001

Expected output:
300000


Actual output:
200000


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
ans = max(0,4-x) + max(0,4-y)
if x==1==y: ans += 4
print(ans*100000)