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: Wrong Answer

Solution code:
a,b = map(int,input().split())
c = 0
if a == 3:
    c += 1
elif a == 2:
    c += 2
elif a == 1:
    c += 3

if b == 3:
    c += 1
elif b == 2:
    b += 2
elif a == 1:
    b += 3

if a == b == 1:
    c += 4

print(c*100000)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 += 100000
    elif X == 1:
        ans += 300000

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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
ans = 0
if x <= 3:
    ans += 300000 // x
if y <= 3:
    ans += 300000 // y

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

Submission status: Wrong Answer

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

if y == 1 :
    r += 300000

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
if X < 4:
  X = X*10000
else:
  None
if Y < 4:
  Y = Y*10000
else:
  None
print(X+Y)

Submission status: Wrong Answer

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

Submission status: Accepted

Solution code:
def plus(x):
    yen = 0
    if x < 4:
        yen = yen + 100000
    if x < 3:
        yen = yen + 100000
    if x < 2:
        yen = yen + 100000
    return yen

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

res = plus(x) + plus(y)

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

print(res)

Submission status: Accepted

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

a,b=map(int,input().split())

ans=money(a)+money(b)+400000 if a==b==1 else money(a)+money(b)
print(ans)

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
x = 300000
y = 200000
z = 100000
A = [x, y, z]
for i in range(1000):
    A.append(0)

a_ = A[a-1]
b_ = A[b-1]

if a == 1 and b == 1:
    print(a_ + b_ + 400000) 
else:
    print(a_ + b_)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil,pi,factorial
    from operator import itemgetter
    def I(): return int(input())
    def MI(): return map(int, input().split())
    def LI(): return list(map(int, input().split()))
    def LI2(): return [int(input()) for i in range(n)]
    def MXI(): return [[LI()]for i in range(n)]
    def SI(): return input().rstrip()
    def printns(x): print('\n'.join(x))
    def printni(x): print('\n'.join(list(map(str,x))))
    inf = 10**17
    mod = 10**9 + 7
#main code here!
    x,y=MI()
    ans=0
    if x<=3:
        ans+=(4-x)*(10**5)   
    if y<=3:
        ans+=(4-y)*(10**5) 
    if x==1 and y==1:
        ans+=4*10**5
    print(ans)
        
        
        



        
        
        
        
        
    
if __name__=="__main__":
    main()

Submission status: Accepted

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

if a == 1:
    if b == 1:
        print(1000000)
    elif b == 2:
        print(500000)
    elif b == 3:
        print(400000)
    else:
        print(300000)
elif a == 2:
    if b == 1:
        print(500000)
    elif b == 2:
        print(400000)
    elif b == 3:
        print(300000)
    else:
        print(200000)
elif a == 3:
    if b == 1:
        print(400000)
    elif b == 2:
        print(300000)
    elif b == 3:
        print(200000)
    else:
        print(100000)
elif a >= 3:
    if b == 1:
        print(300000)
    elif b == 2:
        print(200000)
    elif b == 3:
        print(100000)
    else:
        print(0)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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 sum == 600000:
    sum += 400000

print(sum)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
l=[1,2,3]
z=[300000,200000,100000]
if x==1 and y==1:
    print(1000000)
else:
    ans=0
    if x in [1,2,3]:
        ans+=z[l.index(x)]
    if y in [1,2,3]:
        ans+=z[l.index(y)]
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
if x==y==1:
    print(1000000);exit()
A=[300000,200000,100000]+[0]*1000
print(A[x-1]+A[y-1])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X,Y=map(int,input().split());m=4-min(X,Y)
if X==Y==1:print(10**6)
elif X<=3and Y<=3:print(((4-X)+(4-Y))*10**5)
else:print(m*10**5if m>=0else 0)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split());m=min(X,Y)
if X==Y==1:print(10**6)
elif X<=3and Y<=3:print(((4-X)+(4-Y))*10**5)
else:print((4-m)*10**5if 4-m>=0else 0)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split());m=min(X,Y)
if X==Y==1:print(1000000)
elif X<=3and Y<=3:print(((4-X)+(4-Y))*10**5)
else:print((4-m)*10**5if 4-m>=0else 0)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split());m=min(X,Y)
if X==Y==1:print(1000000)
elif X<=3and Y<=3:print(((4-X)+(4-Y))*10**5)
else:print((4-m)*10**5if 4-m>=0else 0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if X == Y == 1:
    print(1000000)
else:
    if X <= 3 and Y <= 3:
        print(((4-X)+(4-Y))*10**5)
    else:
        print((4-min(X,Y))*10**5 if 4-(min(X,Y)) >= 0 else 0)

Submission status: Accepted

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

if X == Y == 1:
    print(1000000)
else:
    if X <= 3 and Y <= 3:
        print(((4-X)+(4-Y))*10**5)
    elif X >= 4 and Y >= 4:
        print(0)
    else:
        print((4-min(X,Y))*10**5)

Submission status: Accepted

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

if X == Y == 1:
    print((3+3+4)*10**5)
else:
    if (1 <= X <= 3) and (1 <= Y <= 3):
        print(((4-X)+(4-Y))*10**5)
    elif X >= 4 and Y >= 4:
        print(0)
    else:
        print((4-min(X,Y))*10**5)

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
if Y == 1:
  p += 300000
elif Y == 2:
  p += 200000
elif Y == 3:
  p += 100000
if X == Y == 1:
  p += 400000
print (p)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
k = [0,3,2,1] + [0]*1000
ans = k[x]+k[y]
if x == 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(1000000)
elif x == 1 and y == 2 or x == 2 and y == 1:
    print(500000)
elif x == 2 and y == 2 or x == 3 and y == 1 or x == 1 and y == 3:
    print(400000)
elif x == 3 and y == 2 or x == 2 and y == 3 or x == 1 and y >= 4 or x >= 4 and y == 1:
    print(300000)
elif x == 3 and  y == 3 or x == 2 and y >= 4 or x >= 4 and y == 2:
    print(200000)
elif x == 3 and y >= 4 or x >= 4 and y == 3:
    print(100000)
else:
    print(0)

Submission status: Accepted

Solution code:
x, y = map(int, input().split(' '))
if x == 1 and y == 1:
    print(300000 * 2 + 400000)
else:
    print(100000*((4-min(x, 4))+(4-min(y, 4))))

Submission status: Accepted

Solution code:
s = 0
a = 0
for i in map(int, input().split()):
  s += max(0, (4 - i) * 100000)
  if i == 1:
    a += 1
if a == 2:
  s += 400000
print(s)

Submission status: Accepted

Solution code:
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  X,Y=map(int,pin().split())
  if X==1 and Y==1:
    print(1000000)
  else:
    R=[3,2,1]+[0]*205
    print((R[X-1]+R[Y-1])*100000)
  return

main()

Submission status: Accepted

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

def solver(X, Y):
    if X == 1 and Y == 1:
        print(1000000)
        return
    
    a = 0
    if X == 1:
        a += 300000
    if X == 2:
        a += 200000
    if X == 3:
        a += 100000
    if Y == 1:
        a += 300000
    if Y == 2:
        a += 200000
    if Y == 3:
        a += 100000
    
    print(a)

solver(X, Y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#DISCO presents ディスカバリーチャンネル コードコンテス a
def get_money(num):
    if num==3:
        return 100000
    elif num==2:
        return 200000
    elif num==1:
        return 300000
    else:
        return 0
x,y=map(int,input().split())
money=get_money(x)+get_money(y)
if x==y and x==1:
    money+=400000
print(money)

Submission status: Accepted

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

ans = 0

def calc(z):
    ans = 0
    if z == 1:
        ans += 300000
    elif z == 2:
        ans += 200000
    elif z == 3:
        ans += 100000
    
    return ans

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

print(ans+calc(x)+calc(y))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
from functools import lru_cache
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    X, Y = mi()
    pt = 0
    if X == 1:
        pt += 300000
    if X == 2:
        pt += 200000
    if X == 3:
        pt += 100000
    if Y == 1:
        pt += 300000
    if Y == 2:
        pt += 200000
    if Y == 3:
        pt += 100000
    if X == Y == 1:
        pt += 400000

    print(pt)

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:
s = input().split()
kane = int()
if int(s[0]) == 1:
  kane = kane + 300000
elif int(s[0]) == 2:
  kane = kane + 200000
elif int(s[0]) == 3:
  kane = kane + 100000
else:
  pass

if int(s[1]) == 1:
  kane = kane + 300000
elif int(s[1]) == 2:
  kane = kane + 200000
elif int(s[1]) == 3:
  kane = kane + 100000
else:
  pass
  
if int(s[0]) + int(s[1]) == 2:
  kane = 1000000

print(kane)

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

    if 1 <= Y <= 3:
        ans += 100000 * (4 - Y)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

z = 0

if x == 1 and y == 1:
    print(1000000)
    exit()

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

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

print(z)

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict

x, y = [int(i) for i in input().split()]
prize = defaultdict(int)
prize[1] = 300000
prize[2] = 200000
prize[3] = 100000

if x == 1 and y == 1:
  print(prize[1] + prize[1] + 400000)
  exit(0)

print(prize[x] + prize[y])

Submission status: Accepted

Solution code:
import math
import sys
import collections
import bisect
readline = sys.stdin.readline


def main():
	x, y = map(int, readline().rstrip().split())
	print((max(0, 4 - x) + max(0, 4 - y) + max(0, 2 - x * y) * 4) * 100000)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

prize = 0
if x <= 3:
    prize += (300000 - (x - 1) * 100000)
if y <= 3:
    prize += (300000 - (y - 1) * 100000)
if (x == 1) & (y == 1):
    prize += 400000
print(prize)

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())
scores = [300000, 200000, 100000]
ans = 0
if x <= 3:
    ans += scores[x - 1]
if y <= 3:
    ans += scores[y - 1]
if x == 1 and y == 1:
    ans += 400000
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in x:
    if i == 1:
        ans += 300000
    elif i == 2:
        ans += 200000
    elif i == 3:
        ans += 100000
if sum(x) == 2:
    ans += 400000
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for a in [x, y]:
    if a <= 3:
        ans += p[a]
print(ans)

Submission status: Accepted

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

money = [ 300000, 200000, 100000,]
result = 0
if x <= 3:
    result += money[x-1]
if y <= 3:
    result += money[y-1]
if x == 1 and y == 1:
    result += 400000
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
lst={0:0,1:300000,2:200000,3:100000}
if a>3:
    x=0
else:
    x=a
if b>3:
    y=0
else:
    y=b
if x==1 and y==1:
    ans=1000000
else :
    ans=lst[x]+lst[y]


print(ans)

Submission status: Accepted

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

def get(i):
  if i==1:
    return 300000
  if i==2:
    return 200000
  if i==3:
    return 100000
  return 0

print(ans+get(x)+get(y))

Submission status: Accepted

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

prise_dict = {3: 100000, 2: 200000, 1: 300000}
ans = 0
if x in prise_dict.keys():
    ans += prise_dict[x]
if y in prise_dict.keys():
    ans += prise_dict[y]
if x == y == 1:
    ans += 400000
print(ans)

Submission status: Accepted

Solution code:
def resolve():
    A = [int(i) for i in input().split()]
    sumA = 0
    for a in A:
        if a == 1:
            sumA += 300000
        elif a == 2:
            sumA += 200000
        elif a == 3:
            sumA += 100000
    if max(A) == 1:
        sumA += 400000
    print(sumA)

resolve()

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    X, Y = LI_()

    reward = (300000, 200000, 100000, 0)

    ans = reward[min(X, 3)] + reward[min(Y, 3)] + (400000 if X == Y == 0 else 0)
    print(ans)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X, Y = MAP()
print(100000*max(0, 4-X)+100000*max(0, 4-Y)+400000*(X==Y==1))

Submission status: Accepted

Solution code:
from collections import Counter, defaultdict
# n = int(input())
# li = list(map(int, input().split()))
# n = int(input())
a, b = map(int, input().split())
d = defaultdict(lambda: 0)
d[1] = 300000
d[2] = 200000
d[3] = 100000
ans = d[a] + d[b]
if a == 1 and b == 1:
	ans += 400000
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
dic={1:3*10**5,2:2*10**5,3:1*10**5}
c=0
if a in dic and b in dic:
    if a==1 and b==1:
        c+=dic[a]+dic[b]+4*10**5
        print(c)
    else:
        c+=dic[a]+dic[b]
        print(c)

elif a in dic and b not in dic:
    c+=dic[a]
    print(c)


elif b in dic and a not in dic:
    c+=dic[b]
    print(c)

else:
    print(c)

Submission status: Accepted

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

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

Submission status: Accepted

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

A, B = [0] * 206, [0] * 206
A[1] = 300000
A[2] = 200000
A[3] = 100000
B[1] = 300000
B[2] = 200000
B[3] = 100000

if x == 1 and y == 1:
    print(A[x] + B[y] + 400000)
else:
    print(A[x] + B[y])

Submission status: Accepted

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

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 keisan(x):
  if x==1:
    return 300000
  elif x==2:
    return 200000
  elif x==3:
    return 100000
  else:
    return 0

X,Y=map(int,input().split())
ans=keisan(X)+keisan(Y)
if X==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:
a = list(map(int,input().split()))
ans = 0
for v in a:
    if v == 1:
        ans += 300000
    elif v == 2:
        ans += 200000
    elif v == 3:
        ans += 100000
if sum(a) == 2:
    ans += 400000
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
## A - DDCC Finals
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:
def main():
    from builtins import int, map, list, print
    from collections import defaultdict
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    X, Y = input_number_list()
    d = defaultdict(lambda: 0)
    d.update({3: 100000, 2: 200000, 1: 300000})
    ans = d[X] + d[Y]
    if X == Y == 1:
        ans += 400000
    print(ans)


if __name__ == '__main__':
    main()