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:
import sys
input = sys.stdin.readline

X, Y = [int(x) for x in input().strip().split()]

ans = 0
if X == 1:
    ans = 30 * 10 ** 4
elif X == 2:
    ans = 20 * 10 ** 4
elif X == 3:
    ans = 10 * 10 ** 4

if Y == 1:
    ans += 30 * 10 ** 4
elif Y == 2:
    ans += 20 * 10 ** 4
elif Y == 3:
    ans += 10 * 10 ** 4

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

print(ans)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
ans = 0
if a[0] == a[1] == 1:
  ans += 400000
for count in a:
  if count == 1:
    ans += 300000
  elif count == 2:
    ans += 200000
  elif count == 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 and Y == 1:
  res += 400000
print(res)

Submission status: Accepted

Solution code:
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    X, Y = LI()
    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)
    return


# B
def B():
    return


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    A()
    return


# Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
total = 0
data = [x, y]

for d in data:
    if d==1:
        total += 300000
    elif d==2:
        total += 200000
    elif d==3:
        total += 100000

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
X, Y = (int(i) for i in input().split())

price = [300000, 200000, 100000]
total = 0
if X == 1 and Y == 1:
    print(1000000) 
else:
    if X < 4:
        total += price[X-1]
    if Y < 4:
        total += price[Y-1]
    print(total)

Submission status: Accepted

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

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

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

if X == Y == 1:
    answer += 400000

print(answer)

Submission status: Accepted

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

if a==1:
    count+=300000
if a==2:
    count+=200000
if a==3:
    count+=100000
if b==1:
    count+=300000
if b==2:
    count+=200000
if b==3:
    count+=100000
if a==1 and b==1:
    count+=400000

print (count)

Submission status: Accepted

Solution code:
x,y = map(int, input().split())
ans = 0
d = [300000,200000,100000]
if 1<=x and x<=3:
    ans += d[x-1]

if 1<=y and y<=3:
    ans += d[y-1]

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

print(ans)

Submission status: Accepted

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

if X>3 and Y>3:
  print(0)
  exit()

if X == 3:
  ans += 10
elif X == 2:
  ans += 20
elif X == 1:
  ans += 30
if Y == 3:
  ans += 10
elif Y == 2:
  ans += 20
elif Y == 1:
  ans += 30
if X == 1 and Y == 1:
  ans += 40
print(ans*10000)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
mlmis = lambda: [-int(x) for x in input().split()]
INF = float('inf')
#

def main():
    X,Y=mis()
    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==Y==1:
        ans += 400000
    print(ans)



main()

Submission status: Accepted

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

L = [0,300000,200000,100000]
a_x = 0
a_y = 0
if x<=3:
    a_x += L[x]
if y<=3:
    a_y += L[y]

ans = a_x + a_y

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

print(ans)

Submission status: Accepted

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

ans_x = 0
ans_y = 0

if x == 1:
    ans_x = 300000
elif x == 2:
    ans_x = 200000
elif x == 3:
    ans_x = 100000
    
if y == 1:
    ans_y = 300000
elif y == 2:
    ans_y = 200000
elif y == 3:
    ans_y = 100000
    
if ans_x + ans_y == 600000:
    print(600000+400000)
else:
    print(ans_x+ans_y)

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a==1 and b==1:
  print(1000000)
else:
  print(max(0,4-a)*100000+max(0,4-b)*100000)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
if x==1 and y == 1:
    print(400000+300000*2)
    exit()

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

print(ans)

Submission status: Accepted

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

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:
# coding: utf-8
# Your code here!
X,Y=map(int,input().split())

l=[300000,200000,100000]

ans=0
if X==1 and Y==1:
    print("1000000")
    exit()
if X<4:
    ans+=l[X-1]
if Y<4:
    ans+=l[Y-1]

print(ans)

Submission status: Accepted

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

total_prize = 0

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

Submission status: Accepted

Solution code:
def main():  
    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)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 0
money = [300000, 200000, 100000] + ([0] * 210)

ans += (money[x - 1] + money[y - 1])

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

print(ans)

Submission status: Accepted

Solution code:
# 2つの入力を空白で分割し、数値化
X, Y = map(int, input().split())

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

sum = 0


if str(X) in money.keys():
    sum += money[str(X)]

if str(Y) in money.keys():
    sum += money[str(Y)]

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

print(sum)

Submission status: Accepted

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

    print(ans)
if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

x, y = map(int, input().split())

prize = 0

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

if x <= 3 :
    prize += sknList[x - 1]

if y <= 3 :
    prize += sknList[y - 1]

print(prize)

Submission status: Accepted

Solution code:
import collections

x, y = map(int, input().split())
d = collections.defaultdict(int)
d[3] = 100000
d[2] = 200000
d[1] = 300000
ans = 0
if x == 1 and y == 1:
    ans += 400000
ans += d[x] + d[y]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
ans = 0
if x == 1 and y == 1:
    print(1000000)
else:
    if x in [1, 2, 3]:
        ans += (4 - x) * 100000
    if y in [1, 2, 3]:
        ans += (4 - y) * 100000
    print(ans)

Submission status: Accepted

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

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:
import collections as c
ip = lambda : map(int, input().split())
# ##############
x,y = ip()
A = {1:300000,2:200000,3:100000}
if x==1 and y==1:
    print(1000000)
else:
    print(A.get(x,0)+A.get(y,0))

Submission status: Accepted

Solution code:
tmp = list(map(int, input().split()))
x = tmp[0]
y = tmp[1]

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())
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:
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
if ans==600000:
    ans+=400000
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


def answer():
    input = sys.stdin.readline
    x, y = map(int, input().split())

    def reward(x):
        if x==1:
            return 300000
        elif x==2:
            return 200000
        elif x==3:
            return 100000
        return 0

    total = 0
    total += reward(x)
    total += reward(y)
    if x == y == 1:
        total += 400000

    print(total)


if __name__ == '__main__':
    answer()

Submission status: Accepted

Solution code:
x,y=[int(j) for j in input().split()]
if x==1 and 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)

Submission status: Accepted

Solution code:
def main():

    X, Y = map(int, input().split())
    d = {1: 300000, 2: 200000, 3: 100000}
    ans = 0
    if X in d:
        ans += d[X]
    if Y in d:
        ans += d[Y]
    if X == 1 and Y == 1:
        ans += 400000 
    return ans


if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
import sys,itertools
def input():
    return sys.stdin.readline()[:-1]

X,Y = map(int,input().split(' '))
cnt = 0
if X==3:
    cnt += 100000
elif X==2:
    cnt += 200000
elif X==1:
    cnt += 300000

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
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:
    Add=400000
else:
    Add=0
ans=X+Y+Add
print(ans)

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
X, Y = (int(i) for i in input().split())

sum = 0
if X == 1:
    sum += 300000
elif X == 2:
    sum += 200000
elif X == 3:
    sum += 100000
else:
    sum += 0

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

Submission status: Accepted

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

Solution code:
# coding: utf-8
def main():
    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 total == 600000:
        total += 400000
    print(total)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    x, y = map(int, input().split())
    if (x, y) == (1, 1):
        print(1000000)
        return
    ans = 0
    for i in (x, y):
        if i < 4:
            ans += 100000 * (4 - i)
    print(ans)


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)
INF = 10**30

def main():
    x, y = map(int, input().strip().split())
    ans = 0
    for i in [x, y]:
        if i == 3:
            ans += 100000
        elif i == 2:
            ans += 200000
        elif i == 1:
            ans += 300000
    if x == 1 and y == 1:
        ans += 400000
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

ls = ril()
res = 0
for x in ls:
    if x == 3:
        res += 100000
    elif x == 2:
        res += 200000
    elif x == 1:
        res += 300000
if ls[0] == ls[1] == 1:
    res += 400000
print(res)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

getMoney = 0

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

Submission status: Accepted

Solution code:
def gg(x):
    if x > 3:
        return 0
    else:
        return (4-x) * 100000

x,y  =  map(int,input().split())
ans = gg(x) + gg(y)
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 == 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())

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(ans == 600000): ans += 400000
print(ans)

Submission status: Accepted

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

price = 0
flag = False
if x == 1 :
  price += 300000
  flag = True
elif x == 2 :
  price += 200000
elif x == 3 :
  price += 100000

if y == 1 :
  price += 300000
  if flag :
    price += 400000
elif y == 2 :
  price += 200000
elif y == 3 :
  price += 100000

print(price)

Submission status: Accepted

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

if x == 1 and y == 1:
    ans = 1000000
else:
    ans = max(400000-100000*x,0)+max(400000-100000*y,0)

print(ans)

Submission status: Accepted

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


def main():
    X, Y = [int(x) for x in input().split()]
    ans = 0
    if X == 3:
        ans += 100000
    if X == 2:
        ans += 200000
    if X == 1:
        ans += 300000
    if Y == 3:
        ans += 100000
    if Y == 2:
        ans += 200000
    if Y == 1:
        ans += 300000
    if X == 1 and Y == 1:
        ans += 400000
    
    print(ans)

    



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
ans=0
if x==1:
    ans+=300000
if x==2:
    ans+=200000
if x==3:
    ans+=100000
if y==1:
    ans+=300000
if y==2:
    ans+=200000
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())


c = [0, 300000, 200000, 100000]

res = 0
if 0 <= X < 4:
    res += c[X]
if 0 <= Y < 4:
    res += c[Y]

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys
def input():
	return sys.stdin.readline().strip()

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

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

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

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

print(total)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
ans=0
if x==1:
  ans+=300000
if x==2:
  ans+=200000
if x==3:
  ans+=100000
if y==1:
  ans+=300000
if y==2:
  ans+=200000
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())
ans=0
if x<=3:
  ans+=(4-x)*10**5
if y<=3:
  ans+=(4-y)*10**5
if x==1 and y==1:
  ans+=4*10**5
print(ans)

Submission status: Accepted

Solution code:
X, Y = list(map(int, input().split()))
p = [0, 300000, 200000, 100000] + [0]*1000
ans = p[X]+p[Y]
if X==1 and Y==1 : ans+=400000
print(ans)

Submission status: Accepted

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

result = 0

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

result += reward(X) + reward(Y)
if X == 1 and Y == 1:
	result += 400000

print(result)

Submission status: Accepted

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

r=0

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

print(r)

Submission status: Accepted

Solution code:
[x,y] = [int(i) for i in input().split()]
a = max((4-x),0) * 100000
b = max((4-y),0) * 100000
bonus = 0
if x == 1 and y == 1:
  bonus = 400000
print(a+b+bonus)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
if X*Y==1:
    print(10**6)
else:
    print(max((4-X)*10**5,0)+max((4-Y)*10**5,0))

Submission status: Accepted

Solution code:
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:
from collections import Counter

mod = 1000000007


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def main():
    x,y=map(int, input().split())
    a = [300000, 200000, 100000]
    ans = 0
    if x < 4:
        ans += a[x-1]
    if y < 4:
        ans += a[y-1]
    if x == y == 1:
        ans += 400000
    print(ans)
main()

Submission status: Accepted

Solution code:
import sys
import math

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

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

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

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

print(prize)

Submission status: Accepted

Solution code:
x=list(map(int, input().split()))
ans=0
for a in x:
    if a==3:
        ans+=100000
    elif a==2:
        ans+=200000
    elif a==1:
        ans+=300000
if x[0]==x[1] and x[0]==1:
    ans+=400000
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 and y == 1:
    res += 400000
print(res)

Submission status: Accepted

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

for i in [X,Y]:
  if i==1:
    ans+=300000
  elif i==2:
    ans+=200000
  elif i==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
if X <= 3:
    ans += [300000, 200000, 100000][X-1]
if Y <= 3:
    ans += [300000, 200000, 100000][Y-1]
if X==Y==1:
    ans += 400000

print(ans)

Submission status: Accepted

Solution code:
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
#import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()
#sys.setrecursionlimit(10**6)
input=lambda: sys.stdin.readline().rstrip()

show_flg=False
show_flg=True

ans=0
x,y=LI()
m=[0]*10000
m[1]=3
m[2]=2
m[3]=1
#m={1:3,2:2,3:1}
if x==y==1:
    ans=10
else:
    ans=m[x]+m[y]
#for i in range(n):
    
print(ans*10**5)

Submission status: Accepted

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

if x == 1:
    a = 300000
elif x == 2:
    a = 200000
elif x == 3:
    a = 100000
else:
    a = 0
if y == 1:
    b = 300000
elif y == 2:
    b = 200000
elif y == 3:
    b = 100000
else:
    b = 0
if x == 1 and y == 1:
    a = 1000000
    b = 0
print(a+b)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
lst=[0]*210
lst[1]=300000
lst[2]=200000
lst[3]=100000
if x==y==1:
    print(1000000)
else:
    print(lst[x]+lst[y])

Submission status: Accepted

Solution code:
a,b=[int(i) for i in input().split()]
s=0

a= 100000 if a==3 else 200000 if a==2 else 300000 if a==1 else 0
b= 100000 if b==3 else 200000 if b==2 else 300000 if b==1 else 0

s=a+b
if a+b==600000:
    s=1000000
print(s)

Submission status: Accepted

Solution code:
# coding: utf-8
l = [300000, 200000, 100000]
l += [0] * 1000
x, y = map(int, input().split())
if x == y == 1:
    print(l[x-1] + l[y-1] + 400000)
else:
    print(l[x-1] + l[y-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
count = 0
if X == 1:
    count += 300000
if X == 2:
    count += 200000
if X == 3:
    count += 100000
    
if Y == 1:
    count += 300000
if Y == 2:
    count += 200000
if Y == 3:
    count += 100000

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

Submission status: Accepted

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

ans = 0
money = [100000,200000,300000]
if X==1 and Y==1:
    ans += 400000

if X==1: ans += money[2]
elif X==2: ans += money[1]
elif X==3: ans += money[0]

if Y==1: ans += money[2]
elif Y==2: ans += money[1]
elif Y==3: ans += money[0]

print(ans)

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:
X, Y = map(int, input().split())
money = 0

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

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

if X == Y == 1:
    money += 400000

print(money)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#DISCO A
import sys
import math
import collections
#sys.setrecursionlimit(100000)

#n=int(input())

tmp = input().split()
x,y = list(map(lambda a: int(a), tmp))

total=0

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

Submission status: Accepted

Solution code:
def money(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())
ans = money(x) + money(y)
if x == y == 1:
    ans += 400000
print(ans)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
if x==y==1:
    print(300000*2+400000)
    exit()
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
print(a)