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 sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    X,Y = MI()
    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 ans == 600000:
        ans = 1000000
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict


def main():
    X, Y = map(int, input().split())
    award = defaultdict(int)
    award[1] = 300000
    award[2] = 200000
    award[3] = 100000
    ans = award[X] + award[Y]
    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
if x <= 3:
    ans += (100000 * (4 - x))
if y <= 3:
    ans += (100000 * (4 - y))
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 == 3:
  s+= 100000
if X == 2:
  s+= 200000
if X == 1:
  s+=300000
  
if Y == 3:
  s+= 100000
if Y == 2:
  s+= 200000
if Y == 1:
  s+=300000
  
if X == 1 and Y == 1:
  s+=400000
print(s)

Submission status: Accepted

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

if A[1] == 1:
    print(1000000)
else:
    ans = 0
    for a in A:
        if a == 1:
            ans += 300000
        elif a == 2:
            ans += 200000
        elif a == 3:
            ans += 100000
    print(ans)

Submission status: Accepted

Solution code:
X, Y = list(map(float, input().split()))
syo = {3:100000, 2:200000, 1:300000}
ans = 0
for one in [X,Y]:
    if one in syo:
        ans+=syo[one]
if X==1 and Y==1:
    ans+=400000
print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int,input().split())
X -= 1; Y -= 1
money = [300000, 200000, 100000] + [0] * 300
ans = money[X] + money[Y]
if X == Y == 0:
    ans += 400000
print(ans)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [A, B] = string_to_int(inputs[0])
    s = 0
    if A == 1:
        s += 300000
    elif A == 2:
        s += 200000
    elif A == 3:
        s += 100000

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

    if A == 1 and B == 1:
        s += 400000
    return s


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

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

def solve(v):
    if v == 3:
        return 100000
    if v == 2:
        return 200000
    if v == 1:
        return 300000
    return 0

ans = solve(x) + solve(y)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

t = [1, 2, 3]
p = {1: 300000,
     2: 200000,
     3: 100000}

ans = 0
if x in t:
    ans += p[x]
if y in t:
    ans += p[y]

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

print(ans)

Submission status: Accepted

Solution code:
# Contest: DISCO Presents Discovery Channel Code Contest 2020 Qual (https://atcoder.jp/contests/ddcc2020-qual)
# Problem: A: DDCC Finals (https://atcoder.jp/contests/ddcc2020-qual/tasks/ddcc2020_qual_a)

def rint():
    return int(input())


def rints():
    return list(map(int, input().split()))


M = {
    1: 300000,
    2: 200000,
    3: 100000,
}
x, y = rints()
print(M.get(x, 0) + M.get(y, 0) + (400000 if x == y == 1 else 0))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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
for z in [X, Y]:
    if z <= 3:
        ans += 100000*(4-z)

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

print(ans)

Submission status: Accepted

Solution code:
def score(x):
    if x == 1:
        return 300000
    if x == 2:
        return 200000
    if x == 3:
        return 100000
    return 0 

x, y = [int(x) for x in input().split(' ')]

s = score(x) + score(y)
if x == 1 and y == 1:
    s += 400000

print(s)

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())
if x==y==1:
    print(1000000)
else:
    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)

Submission status: Accepted

Solution code:
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# 
# s = input()

a, b = list(map(int, input().split()))
hoge = 100000
ans = 0
if a == 1 and b == 1:
    ans = 1000000
else:
    if a <= 3:
        ans += (4-a) * hoge
    if b <= 3:
        ans += (4-b) * hoge


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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:
def main():
    X, Y = (int(i) for i in input().split())
    ans = 0
    if X == 1 and Y == 1:
        ans += 400000
    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
    print(ans)


if __name__ == '__main__':
    main()

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:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	X,Y = inputMap()

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

	print(ans)


if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
inf=float("inf")
x,y=map(int,input().split())
li=[0,300000,200000,100000]
for i in range(210):
    li.append(0)
if x==1 and y==1:
    print(1000000)
else:
    print(li[x]+li[y])

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

X, Y = MAP()

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

Submission status: Accepted

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

if x < 4:
    ans += l[x-1]
if y < 4:
    ans += l[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:
    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 == 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:
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())

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

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

print(res)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
c = 0
for i in x,y:
    if i < 4:
        c += (4-i)*10**5
if x==y==1:
    c += 4*10**5
print(c)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
Z = [0, 300000, 200000, 100000, 0]

X = min(X, 4)
Y = min(Y, 4)
if (X == 1) and (Y == 1):
    print(1000000)

else:
    print(Z[X] + Z[Y])

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 += 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())
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 read_tokens():
    return input().strip().split(' ')

def read_ints():
    return [int(token) for token in read_tokens()]

def solve(b, n):
    ret = []
    while len(b) > 0:
        # print(b)
        c = None
        for i in reversed(range(len(b))):
            if b[i] > i + 1:
                return [-1]
            if b[i] == i + 1:
                c = b[:i] + b[i+1:]
                ret.append(b[i])
                break
        if c is None:
            return [-1]
        b = c
    return list(reversed(ret))

x, y = read_ints()

def f(x):
    if x <= 3:
        return [300000, 200000, 100000][x-1]
    return 0

s = f(x) + f(y)
if x == 1 and y == 1:
    s += 400000

print(s)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	X, Y = getlist()
	ans = 0
	if X == 1:
		ans += 300000
	elif X == 2:
		ans += 200000
	elif X == 3:
		ans += 100000
	if Y == 1:
		ans += 300000
	elif Y == 2:
		ans += 200000
	elif Y == 3:
		ans += 100000
	if X == 1 and Y == 1:
		ans += 400000
	print(ans)
	
if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

print(ans)

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

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

print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

M = [300000,200000,100000] + [0]*1000

if X==1 and Y==1:
    print(1000000)
else:
    print(M[X-1]+M[Y-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# =int(input())
x,y=map(int,input().split())
if x==1 and y==1:
    print(1000000)
else:
    res=0
    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)

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())
s = 0
s += max(0,(4-X)*100000)
s += max(0,(4-Y)*100000)
s += 400000 if X == 1 and Y == 1 else 0

print(s)

Submission status: Accepted

Solution code:
import  collections
a, b = map(int, input().split(" "))
if a == 1 and b == 1:
    print(1000000)
else:
    di = collections.defaultdict(lambda :0)
    di[1] = 300000
    di[2] = 200000
    di[3] = 100000
    print(di[a] + di[b])

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

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

print(f(X)+f(Y)+400000*((X==1) and (Y == 1)))

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())
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/env python3
import sys


def solve(X: int, Y: int):
    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)
    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:
#%%
x, y = map(int, input().split())
ans = 0
if x == 1:
    ans += 300000
elif x == 2:
    ans += 200000
elif x == 3:
    ans += 100000
if y == 1:
    ans += 300000
elif y == 2:
    ans += 200000
elif y == 3:
    ans += 100000

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

Submission status: Accepted

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

if x[0] == x[1] == 1:
    ans += 400000

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  x,y=LI()
  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
  return ans

# main()
print(main())

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
Xp=max((4-X),0)*100000
Yp=max((4-Y),0)*100000
print(Xp+Yp+((0,400000)[X*Y==1]))

Submission status: Accepted

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

P = {3: 100000, 2: 200000, 1: 300000}
ans = 0
if X in P:
    ans += P[X]
if Y in P:
    ans += P[Y]
if X == Y == 1:
    ans += 400000
print(ans)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import string
import queue
import copy
# import numpy as np
# import scipy
from itertools import permutations, combinations
from heapq import heappop, heappush
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7

def inp(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    return sorted([list(map(int, input().split())) for _ in range(n)])
    
def main():
    ans=0
    x,y=inpm()
    if x == 1:
        ans+=300000
    elif x==2:
        ans+=200000
    elif x==3:
        ans+=100000
    if y == 1:
        ans+=300000
    elif y==2:
        ans+=200000
    elif y==3:
        ans+=100000
    if x==1 and y==1:
        ans+=400000
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import queue
import math
import copy
"""
N = int(input())
#S = input()
# (N,M) = (int(i) for i in input().split(" "))
# A = [int(i) for i in input().split()]
A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""
(N,M) = (int(i) for i in input().split(" "))
a = 0
if N <=3:
	a += 100000*(4-N)
if M <=3:
	a += 100000*(4-M)
if N==1 and M==1:
	a += 400000
print(a)

Submission status: Accepted

Solution code:
import collections
X, Y = [int(_) for _ in input().split()]
a = collections.defaultdict(int)
a[3] = 100000
a[2] = 200000
a[1] = 300000
ans = a[X] + a[Y]
if X == Y == 1:
    ans += 400000
print(ans)

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

a,b = m()

co = 0

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

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

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

print(ans)

Submission status: Accepted

Solution code:
x, y = (int(i) for i in input().split())
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

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

print(point)