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

Submission status: Accepted

Solution code:
a,b = list(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 a==1 and b==1:
  ans+= 400000
  
print(ans)

Submission status: Accepted

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

G = 0

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

if X == 1:
    G += 300000

if X == 2:
    G += 200000

if X == 3:
    G += 100000

if Y == 1:
    G += 300000

if Y == 2:
    G += 200000

if Y == 3:
    G += 100000

print(G)

Submission status: Accepted

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

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

Submission status: Accepted

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

if Y == 1:
    ans += first
elif Y == 2:
    ans += second
elif Y == 3:
    ans += third
else:
    ans += 0

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def main():
  x, y = map(int, input().split())
  x = x - 1
  y = y - 1
  p = (300000, 200000, 100000, 0)
  v = 0

  v += p[min(x, len(p) - 1)]
  v += p[min(y, len(p) - 1)]

  if x + y == 0:
    v += 400000

  print(v)


if __name__ == '__main__':
  main()

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

if X == 1 and Y == 1:
    print(300000 * 2 + 400000)
else:
    print(max(0, 4 - X) * 100000 + max(0, 4 - Y) * 100000)

Submission status: Accepted

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

Submission status: Accepted

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

prize_list = [300000, 200000, 100000]

ans = 0
if X <= 3:
    ans += prize_list[X-1]
if Y <= 3:
    ans += prize_list[Y-1]
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:
  print(1000000)
else:
  print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

prize = 0
cn = disco[0]
sn = disco[1]

if (cn * sn == 1):
    print(1000000)
    exit()

if (cn < 4):
    prize += 400000 - 100000 * cn

if (sn < 4):
    prize += 400000 - 100000 * sn

print(prize)

Submission status: Accepted

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

n=0
if (x,y)==(1,1):
  print(1000000)
  exit()

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

print(n)

Submission status: Accepted

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

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())
l=[300000,200000,100000,0]
if x>=4:
    x=4
if y>=4:
    y=4

if x==1 and y==1:
    print(1000000)
else:
    print(l[x-1]+l[y-1])

Submission status: Accepted

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

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

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

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

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

print(sum)

Submission status: Accepted

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

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

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


print(a + b +c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

S = 0

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

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

if S == 600000:
    S += 400000

print(S)

Submission status: Accepted

Solution code:
import sys

line = sys.stdin.readlines()[0]
X, Y = map(int,line.split(' '))

ret = 0

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

for p in [X,Y]:
    if p == 1:
        ret += 300000
    if p == 2:
        ret += 200000
    if p == 3:
        ret += 100000

print(ret)

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
X = list(map(int,input().split()))
c=100000
b=200000
a=300000
X.sort()
ans=0
cnt=0
for i in X:
    if i==1:
        ans+=a
        cnt+=1
    elif i==2:
        ans+=b
    elif i==3:
        ans+=c
if cnt==2:
    ans += 400000
print(ans)

Submission status: Accepted

Solution code:
x, y = list(map(int, input().split()))
xy = [x, y]
result = 0
for n in [x, y]:
    if n == 3:
        result += 100000
    if n == 2:
        result += 200000
    if n == 1:
        result += 300000
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 == 1 and Y == 1:
    ans = 700000

if X == 2 and Y == 2:
    print(400000)
    exit()

if X == 3 and Y == 3:
    print(200000)
    exit()

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

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

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

Submission status: Accepted

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

ans = 0
for i in [a, b]:
    if i == 1:
        ans += 300000
    elif i == 2:
        ans += 200000
    elif i == 3:
        ans += 100000
if a == 1 and b == 1:
    ans += 400000
print(ans)

Submission status: Accepted

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

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())
p = {1: 300000, 2: 200000, 3: 100000}
sum = 0
if X == 1 and Y == 1:
  sum += 400000
if X <= 3:
  sum += p[X]
if Y <= 3:
  sum += p[Y]
print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t = tuple(map(int, input().split()))
r = sum(max(4 - x, 0) * 100000 for x in t) + (sum(t) == 2 and 400000)
print(r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

points = 0

if x <= 3:
    points += (-x + 4)*100000
if y <= 3:
    points += (-y + 4)*100000
if x == 1 and y == 1:
    points += 400000

print(points)

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

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

rwd_x = rwd_dict.get(x, 0)
rwd_y = rwd_dict.get(y, 0)
rwd_1 = 0
if x == 1 and y == 1:
    rwd_1 = 400000

rwd = rwd_x + rwd_y + rwd_1

print(rwd)

Submission status: Accepted

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

f = sys.stdin
x, y = map(int, f.readline().split(' '))

moneyx = (x==1) * 300000 + (x==2) * 200000 + (x==3) * 100000
moneyy = (y==1) * 300000 + (y==2) * 200000 + (y==3) * 100000
moneyz = (x==1 and y==1) * 400000
moneyall = moneyx + moneyy + moneyz
print(moneyall)

Submission status: Accepted

Solution code:

x,y=map(int,input().split())
val=0
if x*y==1:
  print(1000000)
elif x*y==2:
  print(500000)
elif x*y==3:
  print(400000)
elif x==2 and y==2:
  print(400000)
elif x==2 and y==3:
  print(300000)
elif x==3 and y==2:
  print(300000)
elif x*y==9:
  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 = input().split()
X,Y = int(X),int(Y)

if(X==Y and X==1):
    print(1000000)
    
else:
    if(X>=4):
        X = 0
    if(Y>=4):
        Y = 0

    if(X==1):
        X = 3
    elif(X==3):
        X = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

X_aaa=0
Y_aaa=0

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

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

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

print(X_aaa+Y_aaa)

Submission status: Accepted

Solution code:
a = raw_input().split(" ")
b = int(a[1])
a = int(a[0])
total = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')

X,Y = inpl()
ans = 0
if X == 1 and Y == 1:
    ans += 400000

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = list(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())
if x == 1 and y == 1:
    print(300000*2 + 400000)
elif x == 1 and y == 2:
    print(300000+200000)
elif x == 1 and y == 3:
    print(300000+100000)
elif x == 2 and y == 1:
    print(300000 + 200000)
elif x == 2 and y == 2:
    print(200000+200000)
elif x == 2 and y == 3:
    print(200000+100000)
elif x == 3 and y == 1:
    print(100000+300000)
elif x == 3 and y == 2:
    print(100000+200000)
elif x == 3 and y == 3:
    print(100000+100000)
elif x == 1:
    print(300000)
elif x == 2:
    print(200000)
elif x == 3:
    print(100000)
elif 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()))
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==1 and Y>=4:
  print(300000)
elif X==2 and Y==1:
  print(500000)
elif X==3 and Y==1:
  print(400000)
elif X>=4 and Y==1:
  print(300000)
elif X==2 and Y==3:
  print(300000)
elif X==3 and Y==2:
  print(300000)
elif X==2 and Y==2:
  print(400000)
elif X==3 and Y==3:
  print(200000)
elif X==2 and Y>=4:
  print(200000)
elif X==3 and Y>=4:
  print(100000)
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())
k=0
if x==1 and y==1:
    print("1000000")
else:
    if x==1:
       k+=300000
    else:
       if x==2:
          k+=200000
       else:
           if x==3:
               k+=100000
    if y==1:
        k+=300000
    else:
        if y==2:
            k+=200000
        else:
            if y==3:
                k+=100000
    print(k)

Submission status: Accepted

Solution code:
W = [int(x) for x in input().split()]
if W[0] ==1:
    if W[1] ==1:
        print(1000000)
    elif W[1] ==2:
        print(500000)
    elif W[1] ==3:
        print(400000)
    else:
        print(300000)
elif W[0] ==2:
    if W[1] ==1:
        print(500000)
    elif W[1] ==2:
        print(400000)
    elif W[1] ==3:
        print(300000)
    else:
        print(200000)
elif W[0] ==3:
    if W[1] ==1:
        print(400000)
    elif W[1] ==2:
        print(300000)
    elif W[1] ==3:
        print(200000)
    else:
        print(100000)
else:
    if W[1] ==1:
        print(300000)
    elif W[1] ==2:
        print(200000)
    elif W[1] ==3:
        print(100000)
    else:
        print(0)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L = list(map(int,input().split()))
r = 0
if L.count(1) == 2 :
    r += 4

for a in L :
    if a > 3 :
        r+=0
    else :
        r+=[0,3,2,1][a]
r*=100000
print(r)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
p = {1:300000, 2:200000, 3:100000}

if X == Y == 1:
  print(p[X] + p[Y] + 400000)
elif X <=3 and Y <= 3:
  print(p[X] + p[Y])
elif X <= 3 and not Y <= 3:
  print(p[X])
elif not X <= 3 and Y <= 3:
  print(p[Y])
else:
  print(0)

Submission status: Accepted

Solution code:
import collections
xy_list = list(map(int, input().split()))

score = 0

xy_count = collections.Counter(xy_list)
if xy_count.get(1):
  score += xy_count.get(1) * 300000
  if xy_count.get(1) == 2:
    score += 400000
if xy_count.get(2):
  score += xy_count.get(2) * 200000
if xy_count.get(3):
  score += xy_count.get(3) * 100000

print(score)

Submission status: Accepted

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

print (ret)

Submission status: Accepted

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

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

t = 0
if X==1 and Y==1:
    t = 400000
    
print(p + q + t)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
x = A[0]
y = A[1]
mon = 0
if x < 4:
    if x == 3:
        mon += 100000
    elif x == 2:
        mon += 200000
    elif x == 1:
        mon += 300000
if y < 4:
    if y == 3:
        mon += 100000
    elif y == 2:
        mon += 200000
    elif y == 1:
        mon += 300000
if x == 1:
    if y == 1:
        mon += 400000
print(mon)

Submission status: Accepted

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

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

ans = 0
ans = getM(X)+getM(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:
    x = 300000
elif X == 2:
    x = 200000
elif X == 3:
    x = 100000
else:
    x = 0

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


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

Submission status: Accepted

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

ans = 0
for i in [X, Y]:
    if i == 3:
        ans += 100000
    if i == 2:
        ans += 200000
    if i == 1:
        ans += 300000

if [1, 1] == [X, Y]:
    ans += 400000

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

myans = 0

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

Submission status: Accepted

Solution code:
X, Y = [int(x) for x in input().split()]
prices = {
  3: 100000,
  2: 200000,
  1: 300000
}
totals = 0
if X in prices.keys():
  totals = totals + prices[X]
if Y in prices.keys():
  totals = totals + prices[Y]
if X == 1 and Y == 1:
  totals = totals + 400000
print(totals)

Submission status: Accepted

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

Submission status: Accepted

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

print(res)

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    x, y = map(int, args[0].split())
    ret = 0
    if x == 1 and y == 1:
        ret += 400000

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

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

    return str(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

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())
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:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math
import collections

PRICES = [0, 300000, 200000, 100000]

X, Y = map(int, sys.stdin.readline().rstrip().split(" "))

price = 0
for x in [X, Y]:
    if x <= 3:
        price += PRICES[x]
if X == 1 and Y == 1:
    price += 400000
print(price)
exit(0)

Submission status: Accepted

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

Submission status: Accepted

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

ans=0
if X==1 and Y==1:
    ans+=400000
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:
A ,B = map(int,(input().split()))
one = 300000
two = 200000
three = 100000
result = 0
if A == 1 and B == 1:
    print(one + one + 400000)
    exit(0)
if A == 3:
    result += three
if A == 2:
    result += two
if A == 1:
    result += one
if B == 3:
    result += three
if B == 2:
    result += two
if B == 1:
    result += one
print(result)

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)