Problem:


Score: 100 points

Problem Statement

We held two competitions: Coding Contest and Robot Maneuver.

In each competition, the contestants taking the 3-rd, 2-nd, and 1-st places receive 100000, 200000, and 300000 yen (the currency of Japan), respectively. Furthermore, a contestant taking the first place in both competitions receives an additional 400000 yen.

DISCO-Kun took the X-th place in Coding Contest and the Y-th place in Robot Maneuver.
Find the total amount of money he earned.

Constraints

1 \leq X \leq 205

1 \leq Y \leq 205

X and Y are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

Print the amount of money DISCO-Kun earned, as an integer.

Sample Input 1

1 1

Sample Output 1

1000000

In this case, he earned 300000 yen in Coding Contest and another 300000 yen in Robot Maneuver. Furthermore, as he won both competitions, he got an additional 400000 yen.
In total, he made 300000 + 300000 + 400000 = 1000000 yen.

Sample Input 2

3 101

Sample Output 2

100000

In this case, he earned 100000 yen in Coding Contest.

Sample Input 3

4 4

Sample Output 3

0

In this case, unfortunately, he was the highest-ranked contestant without prize money in both competitions.



Sample input:
1 1


Sample output:
1000000

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X > 3 and Y > 3:
    print(0)
elif (X == 3 and Y > 3) or (Y == 3 and X > 3):
    print(100000)
elif (X == 3 and Y == 3) or (X == 2 and Y > 3) or (Y == 2 and X > 3):
    print(200000)
elif X == 1 and Y == 1:
    print(700000)
elif (X == 1 and Y == 3) or (Y == 1 and X == 3) or (Y == 2 and X == 2):
    print(400000)
elif (X == 2 and Y == 3) or (Y == 2 and X == 3):
    print(500000)
else:
    print(400000)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
'''  Hariom_Pandey
      23.11.2019   '''

import math as mt
import sys as sy
import numpy as np
import operator as op
import time as tt
import functools
from collections import Counter, deque, defaultdict

hari,om = map(int, sy.stdin.readline().split())
if(hari==1 and om==1):
    print(300000+300000+400000)
elif(hari==2 and om==2):
    print(200000*2)
elif(hari==3 and om==3):
    print(100000*2)
elif(hari==1 and om>3 ):
    print(300000)
elif(hari==2 and om>3 ):
    print(200000)
elif(hari==3 and om>3 ):
    print(100000)
elif(hari >3 and om>3):
    print(0)
elif(hari==2 and om==3 or om==3 and hari==2):
    print(200000+100000)
elif(hari==1 and om==2 or hari==2 and om==1):
    print(300000+200000)

Submission status: Wrong Answer

Solution code:
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 & X == 1:
    ans += 400000
 
print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if X == 1 and Y == 1:
    print(1000000)
elif X > 3 and Y > 3:
    print(0)
elif (X == 1 and Y == 2) or (X == 2 and Y == 1):
    print(500000)
elif (X == 1 and Y == 3) or (X == 3 and Y == 1):
    print(400000)
elif (X == 1 and Y > 3) or (X > 3 and Y == 1):
    print(300000)
elif (X == 2 and Y == 3) or (X == 3 and Y == 2):
    print(300000)
elif (X == 2 and Y > 3) or (X > 3 and Y == 2):
    print(200000)
elif (X == 3 and Y == 3) or (X == 3 and Y == 3):
    print(200000)
elif (X == 3 and Y > 3) or (X > 3 and Y == 3):
    print(100000)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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) * 400000)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())

if (x==y==1):
  output=1000000
elif (x*y==2):
  output=500000
elif (x*y==3):
  output=400000
elif (x*y==4):
  output=400000
elif (x*y==6):
  output=300000
elif (x*y==9):
  output=200000
  
#x or y  
elif (x==1 or y==1):
  output=300000
elif (x==2 or y==2):
  output=200000
elif (x==3 or y==3):
  output=100000
else:
  output=0
print(output)

Submission status: Wrong Answer

Solution code:
x,y=(int(x) for x in input().split())
b = 0
if x == 1:
    b += 300000
elif x == 2:
    b += 200000
elif x == 3:
    b += 100000
if y == 1:
    b += 300000
elif y == 2:
    b += 200000
elif y == 3:
    b += 100000
elif x == 1 and y == 1:
    b += 400000
else:
    pass
print(b)

Submission status: Wrong Answer

Solution code:
mylist=[]
mylist=input().split()
mylist_int=[]
mylist_int=[int(s) for s in mylist]
result=0

if mylist_int[0]==3:
    result+=100000
    if mylist_int[1]==3:
        result+=100000
    elif mylist_int[1]==2:
        result+=200000
    elif mylist_int[1]==1:
        result+=300000
        
elif mylist_int[0]==2:
    result+=200000
    if mylist_int[1]==3:
        result+=100000
    elif mylist_int[1]==2:
        result+=200000
    elif mylist_int[1]==1:
        result+=300000
        
elif mylist_int[0]==1:
    result+=300000
    if mylist_int[1]==3:
        result+=100000
    elif mylist_int[1]==2:
        result+=200000
    elif mylist_int[1]==1:
        result+=300000+400000
        
        
print(result)

Submission status: Wrong Answer

Solution code:
s = 0
for i in map(int, raw_input().split()):
    if i == 1:
        s+=300000
    elif i ==2 :
        s+= 200000
    elif i ==3 :
        s+= 100000
if s== 600000:
    s == 1000000
print(s)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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))

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if x*y==1:
  print(1000000)
elif x*y==2:
  print(200000+300000)
elif x*y==3:
  print(300000+100000)
elif (x==1 and y>3) or (x>3 and y==1):
  print(300000)
elif (x==2 and y>3) or (y==2 and x>3):
  print(200000)
elif (x==3 and y>3) or (y==3 and x>3):
  print(100000)
elif (x==2 and y==3) or (y==2 and x==3):
  print(300000)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if X == 1 and Y == 1:
    print(1000000)
elif X > 3 and Y > 3:
    print(0)
elif (X == 1 and Y == 2) or (X == 2 and Y == 1):
    print(500000)
elif (X == 1 and Y == 3) or (X == 3 and Y == 1):
    print(400000)
elif (X == 2 and Y == 3) or (X == 3 and Y == 2):
    print(300000)
elif (X == 3 and Y == 3) or (X == 3 and Y == 3):
    print(200000)
elif (X == 3 and Y > 3) or (X > 3 and Y == 3):
    print(100000)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if X == 1and Y == 1:
    print(1000000)
elif (X == 1and Y == 2) or (X == 2 and Y == 1):
    print(500000)
elif (X == 1and Y == 3) or (X == 3 and Y == 1):
    print(400000)
elif (X == 3and Y == 2) or (X == 2 and Y == 3):
    print(300000)
elif X ==1 or Y == 1:
    print(300000)
elif X == 2 or Y == 2:
    print(200000)
elif X == 3 or Y == 3:
    print(100000)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
from sys import stdin
x,y = map(int, stdin.readline().rstrip().split())
z = {1:300000, 2:200000,3:100000}
ans = 0
if x == 1 and y == 1:
    print(1000000)
else:
    if x < 4:
        ans += z[x]
    elif y < 4:
        ans += z[y]
print(ans)

Submission status: Wrong Answer

Solution code:
'''  Hariom_Pandey
      23.11.2019   '''

import math as mt
import sys as sy
import numpy as np
import operator as op
import time as tt
import functools
from collections import Counter, deque, defaultdict

hari,om = map(int, sy.stdin.readline().split())
if(hari==1 and om==1):
    print(300000+300000+400000)
elif(hari==2 and om==2):
    print(200000*2)
elif(hari==3 and om==3):
    print(100000*2)
elif(hari==1 and om!=1 or om==1 and hari!=1):
    print(300000)
elif(hari==2 and om!=2 or om==2 and hari!=2):
    print(200000)
elif(hari==3 and om!=3 or om==3 and hari!=3):
    print(100000)
elif(hari >3 and om>3):
    print(0)

Submission status: Wrong Answer

Solution code:
a,b= map(int, input().split())
n=0
if a<4:
    n=300000-(a-1)*100000
if b<4:
    n=n+300000-(b-1)*100000
if a==1&b==1:
    n=1000000
print(int(n))

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
z = [300000, 20000, 100000, 0]
if x > 3: x = 4
if y > 3: y = 4
if x == y == 1:
    print(1000000)
else:
    print(z[~-x] + z[~-y])

Submission status: Wrong Answer

Solution code:
N = list(map(int,input().split()))
N.sort()
if N[0]>=4:
    print(0)
else:
    if N ==[1,1]:
        print(1000000)
    elif N==[1,2]:
        print(500000)
    elif N == [1,3]:
        print(400000)
    elif N == [2,3]:
        print(300000)
    elif N ==[3,3]:
        print(200000)
    else:
        if N[0]==1:
            print(300000)
        elif N[0]==2:
            print(200000)
        else:
            print(100000)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x * y == 1:
    print(1000000)
elif x*y == 2:
    print(500000)
elif x == 2 and y == 2:
    print(400000)
elif x*y == 3:
    print(400000)
elif x == 1 or y == 1:
    print(300000)
elif x == 2 and y == 3:
    print(300000)
elif x == 3 and y == 2:
    print(300000)
elif x == 3 and y == 3:
    print(200000)
elif x == 3 or y == 3:
    print(100000)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


def main():
    X, Y = map(int, input().split())

    if X == 1 and Y == 1:
        print(1000000)
        exit()

    if X == 1 and Y == 2:
        print(500000)
    elif X == 1 and Y == 3:
        print(400000)
    elif X == 1:
        print(300000)
    elif X == 2 and Y == 1:
        print(500000)
    elif X == 2 and Y == 2:
        print(400000)
    elif X == 2 and Y == 3:
        print(300000)
    elif X == 2:
        print(200000)
    elif X == 3 and Y == 1:
        print(400000)
    elif X == 3 and Y == 2:
        print(300000)
    elif X == 3 and Y == 3:
        print(200000)
    elif X == 3:
        print(100000)
    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if X == 1 and Y == 1:
    print(1000000)
elif X < 3 and Y < 3:
    print(0)
elif (X == 1 and Y == 2) or (X == 2 and Y == 1):
    print(500000)
elif (X == 1 and Y == 3) or (X == 3 and Y == 1):
    print(400000)
elif (X == 2 and Y == 3) or (X == 3 and Y == 2):
    print(300000)
elif (X == 3 and Y == 3) or (X == 3 and Y == 3):
    print(200000)
elif (X == 3 and Y < 3) or (X < 3 and Y == 3):
    print(100000)

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())
point = 0
if x == 1 and y == 1:
    point = 40000
    
if x == 1:
    point += 30000
elif x == 2:
    point += 20000
elif x == 3:
    point += 10000
else:
    pass

if y == 1:
    point += 30000
elif y == 2:
    point += 20000
elif y == 3:
    point += 10000
else:
    pass

print(point)

Submission status: Wrong Answer

Solution code:
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
X,Y = map(int,input().split())
if X+Y == 2:
    print(1000000)
elif X+Y == 3:
    print(500000)
elif X+Y == 4:
    print(400000)
elif X == 3 or Y == 3:
    print(100000)
elif X == 2 or Y ==2:
    print(200000)
elif X == 1 or Y == 1:
    print(300000)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
'''  Hariom_Pandey
      23.11.2019   '''

import math as mt
import sys as sy
import numpy as np
import operator as op
import time as tt
import functools
from collections import Counter, deque, defaultdict

hari,om = map(int, sy.stdin.readline().split())
if(hari==1 and om==1):
    print(300000+300000+400000)
elif(hari==2 or hari==2):
    print(200000*2)
elif(hari==3 and om==3):
    print(100000*2)
elif(hari==1 and om!=1 or om==1 and hari!=1):
    print(300000)
elif(hari==2 and om!=2 or om==2 and hari!=2):
    print(200000)
elif(hari==3 and om!=3 or om==3 and hari!=3):
    print(100000)
elif(hari >3 and om>3):
    print(0)

Submission status: Wrong Answer

Solution code:
n = input().split(' ')
third = 100000
second =  200000
first = 300000
sum = 0

for i in n:
    if int(i) == 3:
        sum = sum + third
    elif  int(i) == 2:
        sum = sum + second
    elif  int(i) == 1:
        sum = sum + first

if int(n[0]) == 1 and int(n[1]):
    sum = sum + 400000

print(sum)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

ans = 0

if X == 1 and Y == 1:
    ans = 700000

if X == 1 or Y == 1:
    ans += 300000

if X == 2 or Y == 2:
    ans += 200000

if X == 3 or Y == 3:
    ans += 100000
print(ans)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
r=0
if x > 3 :
    r += 0
else :
    r += 100000* [0,3,2,1][x]

if y == 1 :
    r += 300000
if x == 1 and y == 1 :
    r += 400000
print(r)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
money = 0
if A==1 and B ==1:
    print("1000000")
elif A<4 and B > 3:
    money = 100000 * (4-A)
    print(money)
elif A>3 and B < 4:
    money = 100000 * (4-B)
    print(money)
elif A <3 and B <3:
    money = 100000 * (4-A) + 100000 * (4-B)
    print(money)
else:
    print("0")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x * y == 1:
    print(1000000)
elif x*y == 2:
    print(500000)
elif x == 2 and y == 2:
    print(400000)
elif x*y == 3:
    print(400000)
elif x == 1 or y == 1:
    print(300000)
elif x == 2 and y == 3:
    print(300000)
elif x == 3 and y == 2:
    print(300000)
elif x == 3 or y == 3:
    print(100000)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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(sum)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
ans = 0
if X >= 3:
    ans += (4 - X) * 100000
if Y >= 3:
    ans += (4 - Y) * 100000
if X == 1 and Y == 1:
    ans += 400000

print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
ans = 0
if a == 1:ans += 300000
elif a == 2:ans += 200000
elif a == 3:ans += 100000
if b == 1:ans += 300000
elif b == 2:ans += 200000
elif b == 3:ans += 100000
print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

S = 0

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

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

if X == 1 & Y == 1:
    S += 400000

print(S)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
get=0
if x==1 or y==1:
    get+=300000
if x==2 or y==2:
    get+=200000
if x==3 or y==3:
    get+=100000
if x==1 and y==1:
    get+=400000
print(get)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
ranks = [X, Y]
ans = 0

for i in ranks:
    if i == 1:
        ans += 300000
    elif i == 2:
        ans += 200000
    elif i == 3:
        ans += 100000

if (X, Y) == (1, 1):
    ans = 700000

print(ans)

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())

result = 0
if X == 1:
    if Y == 1:
        result = 300000*2 + 400000
    elif Y == 2:
        result = 300000 + 200000
    elif Y == 3:
        result = 300000 + 100000
    else:
        result = 300000
elif X == 2:
    if Y == 1:
        result = 200000 + 300000
    elif Y == 2:
        result = 200000 + 200000
    elif Y == 3:
        result = 200000 + 100000
    else:
        result = 200000
elif X == 3:
    if Y == 1:
        result = 100000 + 300000
    elif Y == 2:
        result = 100000 + 200000
    elif Y == 3:
        result = 100000 + 100000
    else:
        result = 100000
print(result)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if x*y==1:
  print(1000000)
elif x*y==2:
  print(200000+300000)
elif x*y==3:
  print(300000+100000)
elif (x==1 and y!=1) or (x!=1 and y==1):
  print(300000)
elif (x==2 and y>3) or (y==2 and x>3):
  print(200000)
elif (x==3 and y>3) or (y==3 and x>3):
  print(100000)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
X,Y = map(int,input().split())
if X+Y == 2:
    print(1000000)
elif X+Y == 3:
    print(300000)
elif X+Y == 4:
    print(400000)
elif X == 3 or Y == 3:
    print(100000)
elif X == 2 or Y ==2:
    print(200000)
elif X == 1 or Y == 1:
    print(300000)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
a,b= map(int, input().split())
n=0
if a<4:
    n=300000/a
if b<4:
    n=n+(300000/b)
if a==1&b==1:
    n=1000000
print(int(n))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x == 1 and y == 1:print(int(7e5))
elif 1<=x<=3 and 1<=y<=3:
    print(int((8-x-y)*1e5))
elif 1<=x<=3:print(int((4-x)*1e5))
elif 1<=y<=3:print(int((4-y)*1e5))
else:print(0)

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())

X_aaa=0
Y_aaa=0

if X ==1 and Y ==1:
    print(1000000)
    exit()
elif X==1 :
    X_aaa+=300000
elif X==2 :
    X_aaa+=200000
elif X==3 :
    X_aaa+=100000

elif Y==1 :
    Y_aaa+=300000
elif Y==2 :
    Y_aaa+=200000
elif Y==3 :
    Y_aaa+=100000

print(X_aaa+Y_aaa)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

ans = 0

if X == 1 and Y == 1:
    ans += 700000

elif X == 1 or Y == 1:
    ans += 300000

if X == 2 or Y == 2:
    ans += 200000

if X == 3 or Y == 3:
    ans += 100000
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
X, Y = map(int, input().split())

def get_money(rank):
    money = 0
    if rank == 1:
        money = 300000
    elif rank == 2:
        money = 200000
    elif rank == 3:
        money = 100000
    return money

ans = 0
ans += get_money(X)
ans += get_money(Y)

if X == 1 & Y == 1:
    ans += 400000

print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

prices = {1: 3e5, 2: 2e5, 3: 1e5}

ans = 0
if X < 4:
    ans += prices[X]

if Y < 4:
    ans += prices[Y]

if Y == 1 and X == 1:
    ans += 4e5

print(ans)

Submission status: Wrong Answer

Solution code:
X,Y = input().split()
X,Y = int(X),int(Y)
if(X>=4):
    X = 0
if(Y>=4):
    Y = 0

if(X==3):
    X = 1
elif(X==1):
    X = 3
    
if(Y==3):
    Y = 1
elif(Y==1):
    Y = 3
    
if(X==Y and X==1):
    print(1000000)
else:
    print((X+Y)*100000)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x * y == 1:
    print(1000000)
elif x*y == 2:
    print(500000)

elif x*y == 3:
    print(400000)

elif x == 1 or y == 1:
    print(300000)
elif x == 2 and y == 3:
    print(300000)
elif x == 3 and y == 2:
    print(300000)
elif x == 3 or y == 3:
    print(100000)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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 and y==1:
    get+=400000
print(get)

Submission status: Wrong Answer

Solution code:
input_line = input().split()
num_1 = int(input_line[0])
num_2 = int(input_line[1])
worse = 0
if num_1 == 1:
  worse += 300000
elif num_1 == 2:
  worse += 200000
elif num_1 == 3:
  worse += 100000
if num_2 == 1:
  worse += 300000
elif num_2 == 2:
  worse += 200000
elif num_2 == 3:
  worse += 100000
if num_1 == 1 and num_2 == 1:
  worse += 400000

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
res = 0
if x <= 3:
    res += 300000 // x 
if y <= 3:
    res += 300000 // y
if x ==1 and y == 1:
    res += 400000

print(res)

Submission status: Wrong Answer

Solution code:
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 += 10000

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

print(ans)

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
if X < 4:
  X = (4-X)*100000
else:
  X = 0
if Y < 4:
  Y = (4-Y)*100000
else:
  Y = 0
if X == 1 and Y == 1:
  print(X+Y+400000)
else:
  print(X+Y)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

x, y = na()
ans = 0
if x==1 and y==1:
    ans = 10*100000
elif x < 4:
    ans += (4-x) * 100000
elif y < 4:
    ans += (4-y) * 100000

print(ans)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
X,Y = input().split()
X,Y = int(X),int(Y)
if(X>=4):
    X = 0
if(Y>=4):
    Y = 0
    
if(X==Y and X==1):
    print(1000000)
else:
    print((X+Y)*100000)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

KANE = [
    300000,
    200000,
    100000
]
ans=0
if X <= 3:
    ans = KANE[X-1]
    
if Y <= 3:
    ans = KANE[Y-1]
    
if X == 1 and Y == 1:
    ans += 400000 
    
print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

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

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
l = [0,300000,200000,100000]
alpha = 400000
ans = 0
if x == 1 and y == 1:
  ans = l[1]*2 + alpha
  print(ans)
else:
  if 1 <= x <= 3:
    ans = l[x]
  if 1 <= y <= 3:
    ans = l[y]  
  print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
ans = 0
if X == Y == 1:
    ans = 400000 + 300000 + 300000
else:
    if X == 1 or Y == 1:
        ans += 300000
    elif X == 2:
        ans += 200000
    elif  Y == 2:
        ans += 200000
    elif X == 3:
         ans += 100000
    elif Y == 3:
        ans += 100000
print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
r = 0
if(X == 1):
  r += 300000
elif(X == 2):
  r += 200000
elif(X == 3):
  r += 300000
else:
  pass

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

if(X == Y == 1):
  r += 400000

print(r)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
ans=max(0,8-(x+y))
if ans==6:
  ans+=4
print(ans*100000)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
ans = 0
if (X>=4)and(Y>=4):
  print(ans)
  
else:
  ans += 300000-100000*(X-1) + 300000-100000*(Y-1)
  
  if (X==1)and(Y==1):
    ans += 400000
    
  print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

M = 0
if X == 1 and Y == 1:
    M = 1000000
elif X == 1:
    M += 300000
elif X == 2:
    M += 200000
elif X == 3:
    M += 100000
elif Y == 1:
    M += 300000
elif Y == 2:
    M += 200000
elif Y == 3:
    M += 100000
else:
    pass

print(M)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
ans = 0
if a == 1:ans += 300000
elif a == 2:ans += 200000
elif a == 2:ans += 100000
if b == 1:ans += 300000
elif b == 2:ans += 200000
elif b == 2:ans += 100000
print(ans)

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
ans = 0
if X <= 3 :
  ans += (4-X)*100000
if Y <= 3 :
  ans += (4-X)*100000
if X == 1 and Y == 1:
  ans += 400000
print(ans)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
res=0
if x==1 and y==1:
    res+=400000
if x<=3:
    res+=100000*(4-x)
if y<=3:
    res+=100000*(4-x)
print(res)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if x<4:
  score=40000-x*10000
else:
  score=0

if y<4:
  score+=40000-y*10000
else:
  score+=0

if score==60000:
  score=100000

print(score)

Submission status: Wrong Answer

Solution code:
a,b= map(int, input().split())
n=0
if a>4:
    n=300000/a
if b>4:
    n=n+300000/b
if a==1&b==1:
    n=1000000
print(n)

Submission status: Wrong Answer

Solution code:
x, y = list(map(int, input().split()))
ans = 0
if x  == 1 and y == 1:
  ans += 400000
elif x == 1:
  ans += 300000
elif x == 2:
  ans += 200000
elif x == 3:
  ans += 100000
elif y == 1:
  ans += 300000
elif y == 2:
  ans += 200000
elif y == 3:
  ans += 100000
print(ans)

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())

ls = [300000, 200000, 100000] + [0 for i in range(300)]

result = ls[X - 1] + ls[Y - 1]

if X == 1 & Y == 1:
    result += 400000
    
print(result)

Submission status: Wrong Answer

Solution code:
X, Y = map(int,input().split())
sum = 0
def get_money(X, sum):
    if X == 1:
        sum += 300000
    elif X == 2:
        sum += 200000

    elif X == 3:
        sum += 100000

get_money(X, sum)
get_money(Y, sum)

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

print(sum)

Submission status: Wrong Answer

Solution code:
from sys import stdin
X,Y = [int(x) for x in stdin.readline().rstrip().split()]
if X == 1 and Y == 1:
    print(300000*2 + 400000)
elif X == 1 or Y == 1:
    print(300000)
elif X == 2 or Y == 2:
    print(200000)
elif X == 3 or Y == 3:
    print(100000)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

ans = 0

if X == 1 and Y == 1:
    ans = 700000

elif X == 1 or Y == 1:
    ans += 300000

elif X == 2 or Y == 2:
    ans += 200000

elif X == 3 or Y == 3:
    ans += 100000
print(ans)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
x=0 if x>=4 else x
y=0 if y>=4 else y
print(1000000 if x==1 and y==1 else (x+y)*100000)

Submission status: Wrong Answer

Solution code:
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()