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: Accepted

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 = 1000000

print(ans)

Submission status: Accepted

Solution code:
a,b=map(int, input().split())

x=[300000,200000,100000]+[0]*300
y=[300000,200000,100000]+[0]*300

if a==1 and b==1:
    print(1000000)

else:
    print(x[a-1]+x[b-1])

Submission status: Accepted

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

p = [300000, 200000, 100000]
if X < 4:
    ans = p[X - 1]
else:
    ans = 0
if Y < 4:
    ans += p[Y - 1]
if X == 1 and Y == 1:
    ans += 400000

print(ans)

Submission status: Accepted

Solution code:
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 + y == 5:
  print(300000)
elif x + y == 6:
  print(200000)
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: Accepted

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

def money(m,Z):
  if Z == 1:
    m += 300000
  elif Z == 2:
    m += 200000
  elif Z == 3:
    m += 100000
  return m

result = money(0,X)
result = money(result,Y)

if result == 600000:
  result += 400000

print(result)

Submission status: Accepted

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 < 4 and Y < 4:
    ans = 0
    ans += (4 - X)*100000
    ans += (4 - Y)*100000
    print(ans)
    
elif X < 4:
    ans = 0
    ans += (4 - X)*100000
    print(ans)
elif Y < 4:
    ans = 0
    ans += (4 - Y)*100000
    print(ans)
else:
    print(0)

Submission status: Accepted

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 <4 and B <4:
    money = 100000 * (4-A) + 100000 * (4-B)
    print(money)
else:
    print("0")

Submission status: Accepted

Solution code:
PRIZE = [300000, 200000, 100000]

code_rank,  device_rank = [int(s) - 1 for s in input().split(" ")]
code_prize = 0
device_prize = 0

if len(PRIZE) > code_rank:
  code_prize = PRIZE[code_rank]
  
if len(PRIZE) > device_rank:
  device_prize = PRIZE[device_rank]

prize = code_prize + device_prize

if code_rank + device_rank <= 0:
  prize += 400000
  
print(prize)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_xy = input().split()
input_xy = [int(i) for i in input_xy]

if input_xy[0] == 1 and input_xy[1] == 1:
    print(1000000)
    exit()

res = 0

if input_xy[0] == 1:
    res += 300000
elif input_xy[0] == 2:
    res += 200000
elif input_xy[0] == 3:
    res += 100000

if input_xy[1] == 1:
    res += 300000
elif input_xy[1] == 2:
    res += 200000
elif input_xy[1] == 3:
    res += 100000     

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
# x
if (X==1):
    ans += 300000
elif (X==2):
    ans += 200000
elif (X==3):
    ans += 100000

# y
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: Accepted

Solution code:
x,y=map(int,input().split())
ans=0
dic={1:300000,2:200000,3:100000}

def rank(a):
  if a<=3:
    return dic[a]
  else:
    return 0

ans+=rank(x)
ans+=rank(y)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
x, y = input().strip().split(' ')
x, y = [int(x), int(y)]
get = 0
if x == 3:
    get = get + 100000
if y == 3:
    get = get + 100000
if x == 2:
    get = get + 200000
if y == 2:
    get = get + 200000
if x == 1:
    get = get + 300000
if y == 1:
    get = get + 300000
if x == 1 and y == 1:
    get = get + 400000

print(get)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
lis=[0,300000,  200000,  100000]
amt=0
if x <=3:
  amt+=lis[x]
if y<=3:
  amt+=lis[y]
if y==1 and x==1:
  amt+=  400000
print(amt)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
x, y = map(int, input().split())
# 文字列の入力
if x+y == 2:
  prize = 1000000
else:
  prize = sum([100000 * (4-rank) if rank < 4 else 0 for rank in [x,y]])
# 出力
print("{}".format(prize))

Submission status: Accepted

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
  if X == 1:
    ANS += 400000
elif Y == 2:
  ANS += 200000
elif Y == 3:
  ANS += 100000

print(ANS)

Submission status: Accepted

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

res = 0

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

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

if (X == 1) & (Y == 1):
    res += 400000

print(res)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
c = [0]*210
c[1], c[2], c[3] = 3, 2, 1
reword = c[x]+c[y]
if x+y == 2:
    reword += 4

print(reword*100000)

Submission status: Accepted

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

print(c)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
res = 0
if X == 1 and Y == 1:
    print(1000000)
    exit(0)
revenue = [300000,200000,100000,0]
res = revenue[min(X-1, 3)] + revenue[min(Y-1, 3)]
print(res)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
score1 = 300000
score2 = 200000
score3 = 100000
plus = 400000

ans1 = 0
ans2 = 0
if x == 1:
    ans1 = score1
elif x == 2:
    ans1 = score2
elif x == 3:
    ans1 = score3
else:
    ans1 = 0
if y == 1:
    ans2 = score1
elif y == 2:
    ans2 = score2
elif y == 3:
    ans2 = score3
else:
    ans2 = 0

if x == 1 and y == 1:
    print(ans1 + ans2 + plus)
else:
    print(ans1 + ans2)

Submission status: Accepted

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

score = 0

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

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

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
m = [300000, 200000, 100000, 0]
if x > 3:
    x = 4
if y > 3:
    y = 4
ans = m[x - 1] + m[y - 1]
if ans == 600000:
    print(ans + 400000)
else:
    print(ans)

Submission status: Accepted

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
print(worse)

Submission status: Accepted

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

c=0

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

if c==600000:
  c+=400000

print(c)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
if X == 1 and Y == 1:
  print(1000000)
  exit(0)
code_prize = 0
if X == 1:
  code_prize = 300000 
elif X == 2:
  code_prize = 200000
elif X == 3:
  code_prize = 100000
device_prize = 0
if Y == 1:
  device_prize = 300000
elif Y == 2:
  device_prize = 200000
elif Y == 3:
  device_prize = 100000
print(code_prize + device_prize)

Submission status: Accepted

Solution code:
data = input().split(' ')
result = 0
if int(data[0]) == 1:
    result += 300000
elif int(data[0]) == 2:
    result += 200000
elif int(data[0]) == 3:
    result += 100000
if int(data[1]) == 1:
    result +=300000
elif int(data[1]) == 2:
    result += 200000
elif int(data[1])== 3:
    result += 100000

if int(data[0])== 1 and int(data[1]) == 1:
    result += 400000

print(result)

Submission status: Accepted

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

ans = 0

if x == 1: 
    if y == 1:
        ans = 1000000
    elif y == 2:
        ans = 500000
    elif y == 3:
        ans = 400000
    else:
        ans = 300000
elif x == 2: 
    if y == 1:
        ans = 500000
    elif y == 2:
        ans = 400000
    elif y == 3:
        ans = 300000
    else:
        ans = 200000
elif x == 3: 
    if y == 1:
        ans = 400000
    elif y == 2:
        ans = 300000
    elif y == 3:
        ans = 200000
    else:
        ans = 100000
else: 
    if y == 1:
        ans = 300000
    elif y == 2:
        ans = 200000
    elif y == 3:
        ans = 100000
    else:
        ans = 0
print(ans)

Submission status: Accepted

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 and Y == 1:
    result += 400000

print(result)

Submission status: Accepted

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

count = 0

if X == 1 and Y == 1:
    count = 400000
    
if X == 1:
    count += 300000
elif X == 2:
    count += 200000
elif X == 3:
    count += 100000
    
if Y == 1:
    count += 300000
elif Y == 2:
    count += 200000
elif Y == 3:
    count += 100000
    
print(count)

Submission status: Accepted

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

total = 0

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

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


print(total)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
sum = 0
if x == 1 and y == 1:
    sum += 400000
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

print(sum)

Submission status: Accepted

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: Accepted

Solution code:
x, y = map(int, input().split())
def f(n):
    if n == 1:
        return 300000
    elif n == 2:
        return 200000
    elif n == 3:
        return 100000
    return 0
result = f(x) + f(y) + (400000 if x == y == 1 else 0)
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

amount = 0
if x == 1 and y == 1:
    amount += 400000
if x == 2:
    amount += 200000
elif x == 3:
    amount += 100000
elif x == 1:
    amount += 300000
if y == 2:
    amount += 200000
elif y == 3:
    amount += 100000
elif y == 1:
    amount += 300000

print(amount)

Submission status: Accepted

Solution code:
x,y = map(int, input().split())
base = 100000
if x == 1:
  c = 3
elif x == 2:
  c = 2
elif x == 3:
  c = 1
else:
  c = 0
if y == 1:
  m = 3
elif y == 2:
  m = 2
elif y == 3:
  m = 1
else:
  m = 0
ans = base * c + base * m
if x == 1 and y == 1:
  ans += 4 * base

print(ans)

Submission status: Accepted

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: Accepted

Solution code:
x,y = map(int,input().split())
money = [0,300000,200000,100000]
if x ==1 and y ==1:
    print(1000000)
else:
    if x>3:
        x=0
    if y >3:
        y=0
    print(money[x]+money[y])

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

_x, _y = map(int, input().split())


def chker(x, y):
    x = x if x < 4 else 4
    y = y if y < 4 else 4
    syokin = {
        1: 300000,
        2: 200000,
        3: 100000,
        4: 0
    }

    if x == y == 1:
        print('1000000')
        return

    print(syokin[x] + syokin[y])


chker(_x, _y)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
x,y=map(int,input().split())

ans=0

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

ans+=max(400000-x*100000,0)
ans+=max(400000-y*100000,0)

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    X, Y = map(int, input().split())

    money = (0, 300000, 200000, 100000)
    ans = 0
    if X < 4:
        ans = money[X]
    if Y < 4:
        ans += money[Y]
    if X == Y == 1:
        ans += 400000
    print(ans)


main()

Submission status: Accepted

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

if x * y == 1:
	print(1000 * 1000)
else:
	print(max(0, 400000 - 100000 * x) + max(0, 400000 - 100000 * y))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
from itertools import product
from collections import Counter, defaultdict
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

X, Y = inpl()
s = defaultdict(int)
s[1] = 300000
s[2] = 200000
s[3] = 100000
print(s[X] + s[Y] + 400000*(X==Y==1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,= map(int,input().split())
import math
c=[a,b]
sum=0

for i in range(0,2):
    if c[i]==3:
        sum+=100000
    elif c[i]==2:
        sum+=200000
    elif c[i]==1:
        sum+=300000

if c[0]==1 and c[1]==1:
    sum+=400000

print(int(sum))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

X, Y = map(int, input().split())
ans = 0
pay = [0, 300000, 200000, 100000]
if X == 1 and Y == 1:
    print(1000000)
    exit()
if X < 4:
    ans += pay[X]
if Y < 4:
    ans += pay[Y]

print(ans)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
ans = 0
if x==1:
    if y==1:
        print(1000000)
        exit()
    else:
        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)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    x,y=map(int,input().split())
    if x>3:x=0
    if y>3:y=0
    prize=[0,300000,200000,100000]
    ans=prize[x]+prize[y]
    if (x,y)==(1,1):
        ans+=400000
    print(ans)

main()

Submission status: Accepted

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

prize_x = 0
prize_y = 0
prize_z = 0

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

if y == 3:
    prize_y = 100000
elif y == 2:
    prize_y = 200000
elif y == 1:
    prize_y = 300000
    
if x == 1 and y == 1:
    prize_z = 400000

print(prize_x + prize_y + prize_z)

Submission status: Accepted

Solution code:
temp = list(map(int, input().split()))
X = temp[0]
Y = temp[1]

ans = 0

if(X==1):
  ans += 300000
if(Y==1):
  ans += 300000
if(X==2):
  ans += 200000
if(Y==2):
  ans += 200000
if(X==3):
  ans += 100000
if(Y==3):
  ans += 100000
if(X==1 and Y==1):
  ans += 400000
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

if x == 1 and y == 1:
    total += 400000
else:
    total += 0

print(total)

Submission status: Accepted

Solution code:
A ,B = map(int, input().split())
G = 0
if A == 1:
  G += 300000
elif A == 2:
  G += 200000
elif A == 3:
  G += 100000
if B == 1:
  G += 300000
elif B == 2:
  G += 200000
elif B == 3:
  G += 100000
if A == 1 and B == 1:
  G += 400000
print(G)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def solve(x, y):
    ans = 0
    prize = [300000, 200000, 100000]
    if x - 1 < 3:
        ans += prize[x-1]
    if y - 1 < 3:
        ans += prize[y-1]
    if x == 1 and y == 1:
        ans += 400000
    print(ans)

if __name__ == '__main__':
    x, y = map(int, sys.stdin.readline().strip().split())
    solve(x, y)

Submission status: Accepted

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

    if x == 1 and y == 1:
        print(1000000)
    else:
        xc = 400000 - x * 100000 if x <= 3 else 0
        yc = 400000 - y * 100000 if y <= 3 else 0
        print(xc + yc)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
val = [100000, 200000, 300000]

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

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

if x == 1 and y == 1:
	res += 400000
	print(res)
else:
	print(res)

Submission status: Accepted

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

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

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

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

print(ans)

Submission status: Accepted

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

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

def double_money(X, Y):
    if X == 1 and Y == 1:
        return 400000
    else:
        return 0

sum = get_money(X) + get_money(Y) +double_money(X, Y)

print(sum)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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 < 4:
    ans += (4-x) * 100000
if y < 4:
    ans += (4-y) * 100000
if x==1 and y==1:
    ans = 10*100000

print(ans)

Submission status: Accepted

Solution code:
def f(n):
  if n == 3:
    ret = 100000
  elif n == 2:
    ret = 200000
  elif n == 1:
    ret = 300000
  else:
    ret = 0
  return ret

X, Y = map(int, input().split())
ans = f(X) + f(Y)
if X == 1 and Y == 1:
  ans += 400000

print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict
X, Y = map(int, input().split())
dd = defaultdict(int)
dd[1] = 300000
dd[2] = 200000
dd[3] = 100000
if X==Y==1:
    print(1000000)
else:
    print(dd[X]+dd[Y])

Submission status: Accepted

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

def getMoney(n):
    if (n==1):
        return 300000
    elif (n==2):
        return 200000
    elif (n==3):
        return 100000
    else:
        return 0

base=0

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

base+=getMoney(X)
base+=getMoney(Y)

print(base)

Submission status: Accepted

Solution code:
INPUT=input()

X=int(INPUT.split()[0])
Y=int(INPUT.split()[1])

count=0

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

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

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

print(count)

Submission status: Accepted

Solution code:
A,B = [ int(x) for x in input().split()]

prize = [300000, 200000, 100000]

prize_all = 0
if A < 4:
    prize_all += prize[A - 1]
if B < 4:
    prize_all += prize[B - 1]

if A == 1 and B == 1:
    prize_all += 400000

print("{0}".format(prize_all))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
z=[300000,200000,100000]

if x==1 and y==1:
    print(1000000)
else:
    k,l=0,0
    if 1<=x<=3:
         k=z[x-1]
    if 1<=y<=3:
         l=z[y-1]
    print(k+l)

Submission status: Accepted

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
    if X == 2:
        ans += 200000
    if Y == 2:
        ans += 200000
    if X == 3:
         ans += 100000
    if Y == 3:
        ans += 100000
print(ans)

Submission status: Accepted

Solution code:
import sys
x, y = map(int, input().split())
if x==1 and y==1:
    print(1000000)
    sys.exit()

def f(a):
    if a == 1:
        return 300000
    elif a == 2:
        return 200000
    elif a == 3:
        return 100000
    else:
        return 0

ans = f(x) + f(y)
print(ans)

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))

ans = 0

if N[0] == 1:
    ans += 300000
elif N[0] == 2:
    ans += 200000
elif N[0] == 3:
    ans += 100000

if N[1] == 1:
    ans += 300000
elif N[1] == 2:
    ans += 200000
elif N[1] == 3:
    ans += 100000
    
if ans == 600000:
    ans += 400000


print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
syoukin = [3*10**5, 2*10**5, 1*10**5]
if X == 1 and Y == 1:
    print(10*10**5)
else:
    money = 0
    if X <= 3:
        money += syoukin[X-1]
    if Y <= 3:
        money += syoukin[Y-1]
    print(money)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
one = 300000
two = 200000
three = 100000
tokubetu = 400000
xprize = 0
yprize = 0

if x==1:
    xprize = one
elif x==2:
    xprize = two
elif x==3:
    xprize = three
if y==1:
    yprize = one
elif y==2:
    yprize = two
elif y==3:
    yprize = three

if x==1 and y==1:
    print(xprize+yprize+tokubetu)
else:
    print(xprize+yprize)

Submission status: Accepted

Solution code:
x,y = map(int, input().split())
a = {1:300000 , 2:200000, 3: 100000}
ans =0
for i in range(1,4):
  if i == x:
    ans += a[i]
  if i == y:
    ans += a[i]
print(ans + (400000 if x == y and x == 1 else 0))

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
if x==1 and y==1:
    print(1000000)
    exit()
a=[300000,200000,100000,0]
if x>3:
    x=0
if y>3:
    y=0
if x==0 and y==0:
    print(0)
    exit()
print(a[x-1]+a[y-1])

Submission status: Accepted

Solution code:
xy = list(map(int, input().split()))

x = xy[0]
y = xy[1]

if x == 1 and y == 1:
	ans = 400000
else:
	ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
def test(n):
  m = 0
  if n == 3:
    m += 100000
  elif n == 2:
    m += 200000
  elif n == 1:
    m += 300000
  return m

x, y = map(int, input().split())
ans = test(x) + test(y)
if ans == 600000:
  ans += 400000

print(ans)

Submission status: Accepted

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

if b==1:
  p+=300000
elif b==2:
  p+=200000
elif b==3:
  p+=100000
if p==600000:
  p+=400000
print(p)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
prize = [0,3*10**5,2*10**5,10**5]
ans = 0
if X < 4:
    ans += prize[X]
if Y < 4:
    ans += prize[Y]
if X == 1 and Y == 1:
    ans += 4*10**5
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
moneys = [0 for _ in range(3000)]
moneys[1] = 300000
moneys[2] = 200000
moneys[3] = 100000

answer = 0
answer += moneys[X]
answer += moneys[Y]
if (X==1 and Y==1):
    answer += 400000
print(answer)

Submission status: Accepted

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

def f(k):
    if k == 3:
        return 100000
    elif k == 2:
        return 200000
    elif k == 1:
        return 300000            
    else:
        return 0

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

    print(f(X) + f(Y) + (400000 if X == 1 and Y == 1 else 0))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def prize(n):
    if n == 1:
        return 300000
    elif n == 2:
        return 200000
    elif n == 3:
        return 100000
    else:
        return 0


x, y = map(int, input().split())
rst = prize(x) + prize(y)
if x == 1 and y == 1:
    rst += 400000
 
print(rst)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
ans = 0
if (X <=3) | (Y <=3):
    if (X==1) & (Y==1):
        ans = 1000000
    else:
        ans = max((4-X), 0)*100000 + max((4-Y),0)*100000
else:
    ans = 0
    
print(ans)

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline
X, Y = map(int, readline().split())
res = 0
C = [0, 300000, 200000, 100000]
if X == Y == 1:
    res += 400000

if X > 3:
    X = 0
if Y > 3:
    Y = 0
res += C[X]
res += C[Y]
print(res)

Submission status: Accepted

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

a,b,c = 0,0,0

if X == 1 and Y == 1:
  c = 400000

if X == 1:
  a = 300000
elif X == 2:
  a = 200000
elif X == 3:
  a = 100000

if Y == 1:
  b = 300000
elif Y == 2:
  b = 200000
elif Y == 3:
  b = 100000

print(a+b+c)

Submission status: Accepted

Solution code:
def Solve (A, B):
    score = 0
    r = [A, B]
    for i in r:
        if i == '3':
            score += 1
        elif i == '2':
            score += 2
        elif i == '1':
            score += 3
    if A == '1' and B == '1':
        score += 4
    return score*100000
    

A, B = input().split()
print(Solve(A, B))