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())
s = 0
if x == 1:
    s += 300000
    if y == 1:
        s += 400000
elif x == 2:
    s += 200000
elif x == 3:
    s += 100000
else:
    pass

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

print(s)

Submission status: Accepted

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

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

mon = [0, 300000, 200000, 100000]
add = 400000
s = 0
if x == y == 1:
    s += add


def f(x):
    if x <= 3:
        return mon[x]
    return 0


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

Submission status: Accepted

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

result = 0
if (x == 3):
    result += 100000
elif (x == 2):
    result += 200000
elif (x == 1):
    result += 300000


if (y == 3):
    result += 100000
elif (y == 2):
    result += 200000
elif (y == 1):
    result += 300000

if(result == 600000):
    result += 400000

print(result)

Submission status: Accepted

Solution code:
def solve():
    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__':
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
s = 0
if x == 1 and y == 1:
  s += 400000
for i in [x,y]:
  if i == 1:
    s += 300000
  elif i == 2:
    s += 200000
  elif i == 3:
    s += 100000
print(s)

Submission status: Accepted

Solution code:
x, y = list(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 == 1 and y == 1:
    cnt += 400000
    
print(cnt)

Submission status: Accepted

Solution code:
X, Y = [int(s) for s in 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=map(int,input().split())
ans=0
if x==1:
  ans+=3*(10**5)
elif x==2:
  ans+=2*(10**5)
elif x==3:
  ans+=1*(10**5)

if y==1:
  ans+=3*(10**5)
elif y==2:
  ans+=2*(10**5)
elif y==3:
  ans+=1*(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())

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

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

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

print(sum)

Submission status: Accepted

Solution code:
a,s=map(int,input().split())
if a==s and a==1:print(1000000)
else:
  l=[300000,200000,100000,0]
  if a>=4:a=4
  if s>=4:s=4
  print(l[a-1]+l[s-1])

Submission status: Accepted

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

Submission status: Accepted

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


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

ans=0

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

Submission status: Accepted

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

Submission status: Accepted

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

s = 0

if x == 1:
    s += 300000
if y == 1:
    s += 300000

if x == 2:
    s += 200000
if y == 2:
    s += 200000

if x == 3:
    s += 100000
if y == 3:
    s += 100000

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

print(s)

Submission status: Accepted

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


def solve(X: int, Y: int):
    prise=0
    if X<=3:
        prise+=100000*(4-X)
    if Y<=3:
        prise+=100000*(4-Y)
    if X==1 and Y==1:
        prise+=400000
    print(prise)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
a, b = map(int, input().split())

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


ans = prize(a) + prize(b)

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

Submission status: Accepted

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

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

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

if X == 1 and Y == 1:
    print(s[X-1] + s[Y-1] + 4*10**5)
elif X <= 3 and Y <= 3:
    print(s[X-1] + s[Y-1])
elif X <= 3 or Y <= 3:
    if X <= 3:
        print(s[X-1])
    else:
        print(s[Y-1])
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

A, B = map(int, input().split())

D = defaultdict(int)
D["1"] = 3*10**5
D["2"] = 2*10**5
D["3"] = 1*10**5
ans = 0
if A == 1 and B == 1:
    ans += 4*10**5
print(ans+D[str(A)]+D[str(B)])

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

print (S)

Submission status: Accepted

Solution code:
MONEY = (300000, 200000, 100000)

x, y = map(int, input().split())
ret = 0
if x <= 3:
    ret += MONEY[x - 1]
if y <= 3:
    ret += MONEY[y - 1]
if x == y == 1:
    ret += 400000
print(ret)

Submission status: Accepted

Solution code:
[x,y]=list(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:
input = raw_input
x, y = map(int, input().split(" "))

if x == 1 and y == 1:
    out = 3 * 2 + 4
else:
    out = 0
    if x == 1:
        out += 3
    elif x == 2:
        out += 2
    elif x == 3:
        out += 1

    if y == 1:
        out += 3
    elif y == 2:
        out += 2
    elif y == 3:
        out += 1

out *= 100000
print(out)

Submission status: Accepted

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

prise = [300000, 200000, 100000]


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

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

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
l=[300000,200000,100000]
total=0
if a<=3:
    total+=l[a-1]
if b<=3:
    total+=l[b-1]
if a==1 and b==1:
    total+=400000
print(total)

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:
def main():
    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)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

if c == 600000:
    c += 400000

print(c)

Submission status: Accepted

Solution code:
x, y = [int(i) for i in 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 x == 1 and y == 1:
  s += 400000
print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = [ int(v) for v in input().split() ]
if a == 1 and b == 1:
    print(1000000)
else:
    ans = 0
    if a < 4:
        ans += 100000 * (4-a)
    if b < 4:
        ans += 100000 * (4-b)
    print(ans)

Submission status: Accepted

Solution code:
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue
#import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): #startline--------------------------------------------
    X,Y = map(int,input().split())
    A = [300000,200000,100000]
    B = [0]*(300)
    A += B
    if X == 1 and Y == 1:
        print(A[X-1]+A[Y-1]+400000)
    else:
        print(A[X-1]+A[Y-1])
if __name__ == "__main__":
    main() #endline===============================================

Submission status: Accepted

Solution code:
import numpy as np

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

print(result)

Submission status: Accepted

Solution code:
a=[]
n=0
for x in input().split(" "):
    a.append(int(x))
if a[0]==3:
    n+=100000
elif a[0]==2:
    n+=200000
elif a[0]==1:
    n+=300000
if a[1]==3:
    n+=100000
elif a[1]==2:
    n+=200000
elif a[1]==1:
    n+=300000
if a[0]==1 and a[1]==1:
    n+=400000
print(n)

Submission status: Accepted

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

d = [300000, 200000, 100000]

if x == y == 0:
    print(d[x] + d[y] + 400000)
else:
    s = 0

    if x < 3:
        s += d[x]
    if y < 3:
        s += d[y]

    print(s)

Submission status: Accepted

Solution code:
def solve():
    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
        if i == 2:
            ans += 200000
        if i == 1:
            ans += 300000
    
    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

result = 0

if X < 2:
    result += 300000
elif X < 3:
    result += 200000
elif X < 4:
    result += 100000

if Y < 2:
    result += 300000
elif Y < 3:
    result += 200000
elif Y < 4:
    result += 100000

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


print(result)

Submission status: Accepted

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

x = int(x)

y = int(y)

money = 0

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

if y == 1:
    money += 300000
if y == 2:
    money += 200000
if y == 3:
    money += 100000

if money == 600000:
    money = 1000000

print(money)

Submission status: Accepted

Solution code:
juni=[int(thing) for thing in input().split(" ")]
shokin=0
for x in juni:
    if x==1:
        shokin=shokin+300000
    elif x==2:
        shokin=shokin+200000
    elif x==3:
        shokin=shokin+100000
if juni[0]==juni[1] and juni[0]==1:
    shokin=shokin+400000
print(shokin)

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

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
ans = 0
if x == 1 and y == 1:
  print(1000000)
else:
  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 <= 3:
    ans += 4 - X
if Y <= 3:
    ans += 4 - Y
if X == 1 and Y == 1:
    ans += 4
ans *= 100000
print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
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)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


x, y = LI()
ret = 0
for i in (x, y):
    if i == 1:
        ret += 300000
    elif i == 2:
        ret += 200000
    elif i == 3:
        ret += 100000


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



print(ret)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print((max(4 - a, 0) + max(4 - b, 0) + [0, 4][set([a, b]) == {1}]) * 100000)

Submission status: Accepted

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


def main():
    X, Y = list(map(int, input().split()))
    # X = list(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)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

print(total)

Submission status: Accepted

Solution code:
x,y = map(int, input().split())
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 == 2:
    ans += 400000

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

sum=0
if a==1 and b == 1:
  sum += 400000
if a == 1:
  sum += 300000
elif a==2:
  sum += 200000
elif a==3:
  sum += 100000

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

print(sum)

Submission status: Accepted

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


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


def solve(x, y):
    res = PRIZES.get(x, 0)
    res += PRIZES.get(y, 0)
    if x == y == 1:
        res += 400000
    return res


def main():
    x, y = (int(z) for z in input().split())
    res = solve(x, y)
    print(res)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans+400000 if x == 1 and y == 1 else 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 = map(int, input().split())
print(max(0, (4-x) * 100000) + max(0, (4-y) * 100000) if (x-1)**2 + (y-1)**2 != 0 else 10 ** 6)

Submission status: Accepted

Solution code:
X,Y=map(int, raw_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:
tmp = input().split()
X = int(tmp[0])
Y = int(tmp[1])

ans = 0

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

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

print(ans)

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split()]
ans = 0
for i in range(2):
  if l[i] == 1:
    ans += 300000
  elif l[i] == 2:
    ans += 200000
  elif l[i] == 3:
    ans += 100000
if l[0] == 1 and l[1] == 1:
  ans += 400000
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 == 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())
if X == Y == 1:
    print("1000000")
    exit()
point = 0
if X == 1:
    point += 300000
elif X == 2:
    point += 200000
elif X == 3:
    point += 100000

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

Submission status: Accepted

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

Submission status: Accepted

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

r = 0

if X == 1:
    r = r + 300000
elif X == 2:
    r = r + 200000
elif X == 3:
    r = r + 100000
else:
    pass


if Y == 1:
    r = r + 300000
elif Y == 2:
    r = r + 200000
elif Y == 3:
    r = r + 100000
else:
    pass

if X == 1 and Y == 1:
    r = r + 400000
else:
    pass

print(r)

Submission status: Accepted

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

def pay(n):
  if n==1:
    return 300000
  elif n==2:
    return 200000
  elif n==3:
    return 100000
  else:
    return 0
if X == Y == 1:
  print(300000+300000+400000)
else:
  print(pay(X)+pay(Y))

Submission status: Accepted

Solution code:
import numpy

x, y = map(int, input().split())
cost = 0
if x == y == 1:
    cost += 400000

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

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

Submission status: Accepted

Solution code:
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:
    cnt += 300000
if X==1 and Y==1:
    cnt += 400000
print(cnt)

Submission status: Accepted

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

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
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 = [int(i) for i in 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:
# -*- coding: utf-8 -*-
import  numpy as np

def solve():
    X, Y = map(int, input().split())
    res = max(4-X,0)*100000 + max(4-Y,0)*100000 + (X==Y==1)*400000
    return str(res)

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

Submission status: Accepted

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

A, B = map(int, input().split())
res = 0
if A in (1,2,3):
    res += (4-A)*100000
if B in (1,2,3):
    res += (4-B)*100000
if (A,B) == (1,1):
    res += 4*100000

print(res)

Submission status: Accepted

Solution code:
X, Y = [int(x) for x in input().split(' ')]
prize = {
    1:300000,
    2:200000,
    3:100000,
}

if (X == 1) and (Y == 1):
    print(1000000)
else:
    s = 0
    if X < 4:
        s += prize[X]
    if Y < 4:
        s += prize[Y]
    print(s)

Submission status: Accepted

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

V = 0

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

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

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

print(V)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
X, Y = map(int, input().split(' '))

ans = 0

prices = [0, 300000, 200000, 100000]
if X < 4:
    ans += prices[X]

if Y < 4:
    ans += prices[Y]

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

print(ans)

Submission status: Accepted

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

x = 0
y = 0
z = 0

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

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

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

print(x + y + z)

Submission status: Accepted

Solution code:
import sys; readline = sys.stdin.readline
from collections import deque

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

ans = 0

for a in (X, Y):
    if a == 1:
        ans += 300000
    elif a == 2:
        ans += 200000
    elif a == 3:
        ans += 100000

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

print(ans)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if x == 1 and y == 1:
    print(10**6)
else:
    te = [0, 3*10**5, 2*10**5, 1*10**5]
    if x>3:
        x=0
    if y>3:
        y=0
    print(te[x]+te[y])

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
val = [300000, 200000, 100000]
ans = 0
for i in (x, y):
    if i < 4:
        ans += val[i - 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 == 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())

out = 0

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

if x <= 3:
  out += 100000 * (4-x)

if y <= 3:
  out += 100000 * (4-y)
 
print(out)