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.

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    x,y=map(int,input().split())
    ans=0
    if(x==1):
        ans+=3
    elif(x==2):
        ans+=2
    elif(x==3):
        ans+=1
    if(y==1):
        ans+=3
    elif(y==2):
        ans+=2
    elif(y==3):
        ans+=1
    if(x==1 and y==1):
        ans+=4
    print(ans*100000)
resolve()

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

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

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

bonus = 400000

print(d.get(x, 0) + d.get(y, 0) + (bonus if x == 1 and y == 1 else 0))

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

Solution (Python):

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

X,Y  =inpl()

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)

Solution (Python):
x,y=map(int,input().split())
if x==1 and y==1:
    print(1000000)
    exit()
print(max(0,4-x)*100000+max(0,4-y)*100000)

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

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

if X==1 and Y==1:
    print(1000000)
else:
    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)

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

ans = 0

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

ans += nasu(X)
ans += nasu(Y)

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

print(ans)

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

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

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

print(h(x)+h(y)+(400000 if x == y == 1 else 0))

Solution (Python):
X, Y = map(int, raw_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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 


x,y = [int(i) for i in readline().split()]


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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Solution (Python):
x,y=[int(i)for i in input().split()]
p=[300000,200000,100000]
s=0
if x<4:
    s+=p[x-1]
if y<4:
    s+=p[y-1]
if s==600000:
    s=1000000
print(s)

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

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

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

Solution (Python):
a, b = map(int, raw_input().split())
n = 0

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

if b == 1:
  n += 300000
elif b == 2:
  n += 200000
elif b == 3:
  n += 100000

if a == 1 and b == 1:
  n += 400000

print(n)

Solution (Python):

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
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)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    x,y = LI()
    ans = 0
    f = [300000,200000,100000,0]
    if x == 1 and y == 1:
        print(1000000)
    else:
        ans = f[min(3,x-1)]+f[min(3,y-1)]
        print(ans)
    return


if __name__ == "__main__":
    solve()

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7



X, Y = list(map(int, sys.stdin.buffer.readline().split()))

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

Solution (Python):

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


prize_code = 0;
if X == 1:
	prize_code = 300000;
elif X == 2:
	prize_code = 200000;
elif X == 3:
	prize_code = 100000;


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


prize_both = 0
if X == 1 and Y == 1:
	prize_both = 400000


prize_total = prize_code + prize_device + prize_both
print(prize_total)