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());print(max((4-X)*10**5,0)+max((4-Y)*10**5,0)+(400000 if (X,Y)==(1,1) else 0))

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:
X, Y = list(map(int, input().split()))
pX = [0 for _ in range(206)]
pX[1] = 300000
pX[2] = 200000
pX[3] = 100000

point = pX[X] + pX[Y]
if X == 1 and Y == 1:
    point += 400000

print(point)

Submission status: Accepted

Solution code:
a = {1:300000,2:200000,3:100000}

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

if x == 1 and y == 1:
	print(a[x] + a[y] + 400000)
else:
	if x > 3 and y <= 3:
		print(a[y])
	elif x <= 3 and y > 3:
		print(a[x])
	elif x>3 and y >3:
		print(0)
	else:
		print(a[x] + a[y])

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
ans=0
if X==1:
    if Y==1:
        ans+=400000
    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
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

if x > 3:
    x = 0
if y > 3:
    y = 0
if x == 1 and y == 1:
    print(1000000)
else:
    print(100000 * (- x % 4) + 100000 * (- y % 4))

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
from collections import defaultdict
dic = defaultdict(lambda: 0)
dic[1] = 300000
dic[2] = 200000
dic[3] = 100000
if x == 1 and y == 1:
    print(1000000)
else:
    print(dic[x]+dic[y])

Submission status: Accepted

Solution code:
def solve(x, y):
    res = 0
    res += max(0, (4-x) * 10**5)
    res += max(0, (4-y) * 10**5)
    res += 4 * 10**5 * int(x==1 and y==1)
    return res

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

Submission status: Accepted

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

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

Submission status: Accepted

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

trd = 100000
srd = 200000
onrd = 300000

if X == 3 and 3 < Y:
    print(trd)
elif X == 2 and 3 < Y:
    print(srd)
elif X == 1 and 3 < Y:
    print(onrd)
elif Y == 3 and 3 < X:
    print(trd)
elif Y == 2 and 3 < X:
    print(srd)  
elif Y == 1 and 3 < X:
    print(onrd)
elif X == 3 and Y == 3:
    print((trd)+(trd))
elif X == 3 and Y == 2:
    print((trd) +(srd))
elif X == 3 and Y == 1:
    print((trd)+(onrd))
elif X == 2 and Y == 3:
    print((srd)+(trd))
elif X == 2 and Y == 2:
    print((srd)+(srd))
elif X == 2 and Y == 1:
    print((srd)+(onrd))
elif X == 1 and Y == 3:
    print((onrd)+(trd))
elif X == 1 and Y == 2:
    print((onrd) + (srd))
elif X == 1 and Y == 1:
    print((onrd)+(onrd) + 400000)
else:
    print(0)

Submission status: Accepted

Solution code:

def main():
    x,y = map(int,input().split())
    ans = 0
    if x == 1:
        ans += 300000
    elif x == 2:
        ans += 200000
    elif x == 3:
        ans += 100000
    else:
        pass

    if y == 1:
        ans += 300000
    elif y == 2:
        ans += 200000
    elif y == 3:
        ans += 100000
    else:
        pass
    
    if x==1 and y==1:
        ans += 400000
    
    print(ans)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
X, Y = [int(_) for _ in input().split()]

ans = 0
V = [400000, 300000, 200000, 100000]
if X <= 3:
    ans += V[X]
if Y <= 3:
    ans += V[Y]
if X == Y == 1:
    ans += V[0]

print(ans)

Submission status: Accepted

Solution code:
rewards = 0

c, d = input().split(" ")

rewards += 300000 if c == "1" else 0
rewards += 200000 if c == "2" else 0
rewards += 100000 if c == "3" else 0

rewards += 300000 if d == "1" else 0
rewards += 200000 if d == "2" else 0
rewards += 100000 if d == "3" else 0

rewards += 400000 if c == "1" and d == "1" else 0
  
print(rewards)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
s = [300000, 200000, 100000] + [0] * 500
z = s[x - 1] + s[y - 1] + (400000 if x == 1 and y == 1 else 0)
print(z)

Submission status: Accepted

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

Submission status: Accepted

Solution code:



def resolve():
    x,y=(int(i) for i in input().split())
    if x==1 and y==1:
        print(1000000)
        return
    c=0
    if x==1:
        c+=300000
    if x==2:
        c+=200000
    if x==3:
        c+=100000

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




if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
ans = 0
for i in [X, Y]:
	if i < 4:
		ans += (4 - i) * 10**5
if ans == 6 * 10**5:
	ans = 10 * 10**5
print(ans)

Submission status: Accepted

Solution code:
codePlace, implePlace = map(int, input().split(" "))

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

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

print(totalPrice)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split(" " ))
Z=[0,300000, 200000, 100000]
if (X>3): 
    X=0
if (Y>3):
    Y=0
sum = 0
if X==1 and Y==1:
    sum = 400000
print (Z[X]+ Z[Y]+sum)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/ddcc2020-qual/tasks/ddcc2020_qual_a

import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    x, y = map(int, input().split())

    ans = 0
    for rank in [x, y]:
        if rank == 1:
            ans += 300000
        if rank == 2:
            ans += 200000
        if rank == 3:
            ans += 100000
    if x == 1 and y == 1:
        ans += 400000

    print(ans)

    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
money = {1:300000,2:200000,3:100000}
X, Y = map(int,input().split())
ans = 0
if 1<=X<=3:
    ans += money[X]
if 1<=Y<=3:
    ans += money[Y]
if X==Y==1:
    ans+=400000
print(ans)

Submission status: Accepted

Solution code:
arr=list(map(int,input().split()))
s=0
for i in range(1,4):
  for j in range(2):
    if arr[j]==i:
      s+=(4-i)*100000
if arr[0]==arr[1] and arr[1]==1:
  s+=400000
print(s)

Submission status: Accepted

Solution code:
n,m = map(int,input().split())
lis = [0]*205
lis[0] = 300000
lis[1] = 200000
lis[2] = 100000
if n == m and n == 1:
  print(1000000)
else:
  print(lis[n-1]+lis[m-1])

Submission status: Accepted

Solution code:
x,y = map(int ,input().split())
dec = {1:300000, 2:200000, 3:100000}
ans = 0
if x in dec.keys():
	ans += dec[x]
if y in dec.keys():
	ans += dec[y]

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

dic = {1:300000, 2:200000, 3:100000}
if x in dic:
  ans = dic[x]
if y in dic:
  ans += dic[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:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    x, y = list(map(int, readline().split()))
    if x == 1 and y == 1:
        print(300000 * 2 + 400000)
    else:
        t = 0
        if x == 1:
            t += 300000
        elif x == 2:
            t += 200000
        elif x == 3:
            t += 100000
            
        if y == 1:
            t += 300000
        elif y == 2:
            t += 200000
        elif y == 3:
            t += 100000
        print(t)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

answer = 0

for a in [x, y]:
    if a == 3:
        answer += 100000
    elif a == 2:
        answer += 200000
    elif a == 1:
        answer += 300000
    else:
        pass
if x == 1 and y == 1:
    answer += 400000

print(answer)

Submission status: Accepted

Solution code:
def main(x: int, y: int):
    award = 0

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

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

    print(award)


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

    main(x, y)

Submission status: Accepted

Solution code:
a,b=[int(x) for x in 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:
n = [int(i) for i in input().split()]
T=0
for i in range(2):
        if n[i] == 1: T+=3
        elif n[i] == 2: T+=2
        elif n[i] == 3: T+=1
if sum(n)==2: T+=4
print(T*100000)

Submission status: Accepted

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

if x == 1 and y == 1:
  print(10**6)
else:

  x = 0 if x >= 4 else 4 - x
  y = 0 if y >= 4 else 4 - y
  print(x*10**5 + y*10**5)

Submission status: Accepted

Solution code:
c1, c2 = map(int, input().split())

prizes = [300000, 200000, 100000]
total_prize = 0
if(c1 <= 3):
  total_prize += prizes[c1-1]
if(c2 <= 3):
  total_prize += prizes[c2-1]
if(c1==1 and c2==1):
  total_prize += 400000
print(total_prize)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(X: int, Y: int):
    ans = 0
    if X == 3:
        ans += 1
    elif X == 2:
        ans += 2
    elif X == 1:
        ans += 3
    
    if Y == 3:
        ans += 1
    elif Y == 2:
        ans += 2
    elif Y == 1:
        ans += 3
    
    if X == 1 and Y == 1:
        ans += 4
    
    print(ans*10**5)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(X, Y)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = input().split()
prizes = {'1': 300000, '2': 200000, '3': 100000}
ans = prizes.get(x, 0) + prizes.get(y, 0)
if x == y == '1':
    ans += 400000
print(ans)

Submission status: Accepted

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

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


x = get_money(X)
y = get_money(Y)

if X == 1 and Y == 1:
    z = 400000
else:
    z = 0
ans = x + y + z

print(ans)

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())
if(x==y==1):
  print(1000000)
else:
  ans=max(4-x,0)*100000+max(4-y,0)*100000
  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 == 5:
  print(300000)
elif x + y == 4:
  print(400000)
elif x + y == 6:
  print(200000)
elif x + y >=5 and min(x,y) == 1:
  print(300000)
elif x + y >=5 and min(x,y) == 2:
  print(200000)
elif x + y >=5 and min(x,y) == 3:
  print(100000)
else:
  print(0)

Submission status: Accepted

Solution code:
#DDCC Finals
X, Y = map(int,input().split())
money = 0
moneyX = 400000 - X*100000
moneyY = 400000 - Y*100000
if moneyX > 0:
    money += moneyX
if moneyY > 0:
    money += moneyY
if money == 600000:
    money += 400000
print(money)

Submission status: Accepted

Solution code:
prize = {1:300000,2:200000,3:100000}

a,b = [int(i) for i in input().split()]

if a == b == 1:
    print(1000000)
elif a < 4 and b < 4:
    print(prize[a] + prize[b])
elif a >= 4 and b < 4:
    print(prize[b])
elif b >= 4 and a < 4:
    print(prize[a])
else:
    print(0)

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

C=[300000,200000,100000,0]

print(C[X-1]+C[Y-1]+400000 if X==Y==1 else C[X-1]+C[Y-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = input().split()
nums = []
for i in num:
  nums.append(int(i))
#print(nums)
price = [300000, 200000, 100000]
result = []
 
#2 3 4 5 6
for i in nums:
  if int(i) > 3:
    result.append(0)
  else:
    result.append(price[i-1])
value = result[0] + result[1]
if value == 600000:
  print("1000000")
else:
  print(value)

Submission status: Accepted

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

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

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

if x == 1 and y == 1:
    ans += 400000
    
li = [0,300000, 200000, 100000]

if x <= 3:
    ans += li[x]
if y <= 3:
    ans += li[y]

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

Submission status: Accepted

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

if x <= 3:
    ans += prize[x]
if y <= 3:
    ans += prize[y]

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
k=[1,2,3]
l=[0,300000,200000,100000]
p=0
if x in k:
  p+=l[x]
if y in k:
  p+=l[y]
if x==1 and y==1:
  p+=400000
print(p)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
ans = 0
money = [0, 3, 2, 1]

if x <= 3:
    ans += money[x]
if y <= 3:
    ans += money[y]

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

print(ans*10**5)

Submission status: Accepted

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

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

def solve():
    X, Y = map(int, input().split())
    ans = 0

    ans += get_syokin(X)
    ans += get_syokin(Y)

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

    print(ans)


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

d = {1: 300000, 2: 200000, 3: 100000}
ans = 0
ans += d.get(X, 0)
ans += d.get(Y, 0)
if X == 1 and Y == 1:
    ans += 400000

print(ans)

Submission status: Accepted

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

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

ans = f(a) + f(b)
if a == 1 and b == 1:
  ans += 400000
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

#coding:
if x == 1:
  money += 300000
elif x == 2:
  money += 200000
elif x == 3:
  money += 100000

#device:
if y == 1:
  money += 300000
elif y == 2:
  money += 200000
elif y == 3:
  money += 100000
  
#bonus
if x == 1 and y == 1:
  money += 400000

print(money)

Submission status: Accepted

Solution code:
res = {1:300000, 2:200000, 3:100000}
a, b = map(int, input().split())
if a == b == 1:
	c = 400000
else:
	c = 0
try:
	a = res[a]
except:
	a = 0
try:
	b = res[b]
except:
	b = 0
print(c+a+b)

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:
  c=400000
else:
  c=0
  
print(a+b+c)

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

ans = 0
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())
prize = [300000, 200000, 100000]
ans = 0

if X <= 3:
    X -= 1
    ans += prize[X]

if Y <= 3:
    Y -= 1
    ans += prize[Y]

if ans == 600000:
    ans += 400000

print(ans)

Submission status: Accepted

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


def main():
    x, y = map(int, input().split())
    ans = 0

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

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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
s = max(0,(4-x)*100000)+max(0,(4-y)*100000)
print(s if s!=600000 else s+400000)

Submission status: Accepted

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

total_money = 0

if x >= 4:
    total_money += 0
elif x == 3:
    total_money += 100000
elif x == 2:
    total_money += 200000
elif x == 1:
    total_money += 300000

if y >= 4:
    total_money += 0
elif y == 3:
    total_money += 100000
elif y == 2:
    total_money += 200000
elif y == 1:
    total_money += 300000

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

print(total_money)

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque, defaultdict
import itertools as ite
import sys
import math
import decimal

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7
X, Y = map(int, raw_input().split())
ans = max(4 - X, 0) * 100000 + max(4 - Y, 0) * 100000
if X * Y == 1:
    ans += 400000
print ans

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

print(s)

Submission status: Accepted

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

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

print(sum_)

Submission status: Accepted

Solution code:
num = input().split()
nums = []
for i in num:
  nums.append(int(i))
#print(nums)
price = [300000, 200000, 100000]
result = []

#2 3 4 5 6
for i in nums:
  if int(i) > 3:
    result.append(0)
  else:
    result.append(price[i-1])
value = result[0] + result[1]
if value == 600000:
  print("1000000")
else:
  print(value)

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
else:
    ans += 0

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

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

print(ans)

Submission status: Accepted

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

points = [-1, 300000, 200000, 100000, 0]
print(400000*(X==Y==1) + points[min(4, X)] + points[min(4, Y)])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
x,y = map(int,input().split())
if x == 1 and y == 1:
#if False:
    print(10**6)
else:
    print((max(0,4-x)+max(0,4-y))*(10**5))

Submission status: Accepted

Solution code:
X, Y =[int(x) for x in input().split()]
ans = 0
if (X <= 3): ans += (4-X) * 100000
if (Y <= 3): ans += (4-Y) * 100000
if (X*Y==1): ans += 400000
print(ans)

Submission status: Accepted

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

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

elif X == 1 and Y == 2:
    print("500000")

elif X == 1 and Y == 3:
    print("400000")

elif X == 2 and Y == 3:
    print("300000")

elif X == 2 and Y == 2:
    print("400000")
   
elif X == 3 and Y == 3:
    print("200000")

elif X == 3 and Y == 2:
    print("300000")
    
elif X == 2 and Y == 1:
    print("500000")

elif X == 3 and Y == 1:
    print("400000")

elif X == 1 and Y >= 4:
    print("300000")

elif X == 2 and Y >= 4:
    print("200000")  

elif X == 3 and Y >= 4:
    print("100000")

elif X >= 4 and Y == 1:
    print("300000")

elif X >= 4 and Y == 2:
    print("200000")

elif X >= 4 and Y == 3:
    print("100000")

else:
    print("0")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M=[int(i) for i in input().split()]
ans=0
for i in [N,M]:
  if i==1:
    ans += 3
  elif i==2:
    ans += 2
  elif i==3:
    ans+=1
if N==1 and M==1:
  ans+=4
print(ans*100000)

Submission status: Accepted

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

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

prise = {3: 100000, 2: 200000, 1: 300000}
ans = 0
if x in (1, 2, 3):
    ans += prise[x]
if y in (1, 2, 3):
    ans += prise[y]

print(ans + 400000 if x == y == 1 else 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:
#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

A=list(map(int,input().split()))
for ai in A:
    if ai==1:
        ans+=300000
    elif ai==2:
        ans+=200000
    elif ai==3:
         ans+=100000
if A[0]==1 and A[1]==1:
    ans+=400000
print(ans)

Submission status: Accepted

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

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())
T = 0

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

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

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

print(T)

Submission status: Accepted

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

ans = 0
for i in a:
    if i == 1:
        ans += 300000
    elif i == 2:
        ans += 200000
    elif i == 3:
        ans += 100000
    
if a[0] == a[1] == 1:
    ans += 400000

print(ans)

Submission status: Accepted

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

price = [3*10**5, 2*10**5, 1*10**5]

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

X -= 1
Y -= 1

if X < 3:
    ans += price[X]
if Y < 3:
    ans += price[Y]

print(ans)

Submission status: Accepted

Solution code:
X, Y = [int(n) for n in input().split()]
V = {0: 400000, 1: 300000, 2: 200000, 3: 100000}
ans = 0
for i in [X, Y]:
    ans += V.setdefault(i, 0)
print(ans+V[0] if X==1==Y else ans)

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, y = (int(x) for x in input().split())
if x == y == 1: print(1000000)
else:
    ans = 0
    points = [300000, 200000, 100000]
    if x <= 3: ans += points[x-1]
    if y <= 3: ans += points[y-1]
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def a_ddcc_finals():
    X, Y = [int(i) for i in input().split()]
    prizes = {1: 300000, 2: 200000, 3: 100000}
    ans = 0
    for rank in (X, Y):
        if rank in prizes.keys():
            ans += prizes[rank]
    ans += 400000 if X == 1 and Y == 1 else 0
    return ans

print(a_ddcc_finals())

Submission status: Accepted

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

prize=[0,300000,200000,100000]

ans=0
for c in [X,Y]:
    if c<=3:
        ans+=prize[c]

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y=[max(4-int(i),0)for i in input().split()];print((x+y+4*(x>2<y))*10**5)

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=map(int,input().split())
print(100000*(max(4-x,0)+max(4-y,0)+4*(x==y==1)))

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
ans = max(4 - X, 0) + max(4 - Y, 0) + max(12 - (X + Y) * 4, 0)
print(ans * 100000)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
S = 0
R = [300000, 200000, 100000]
for i in range(max(X, Y)):
  R.append(0)

if X == 1 and Y == 1:
  print(R[X-1] + R[X-1] + 400000)
else:
  print(R[X-1] + R[Y-1])

Submission status: Accepted

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