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())
x = 300000
y = 200000
z = 100000
A = [x, y, z]

if a == b == 1:
    print(A[0]*2 + 400000)
else:
    if a <= 3 and b <= 3:
        print(A[a-1] + A[a-1])
    else:
        if a <= 3:
            print(A[a-1])
        else:
            if b <= 3:
                print(A[b-1])
            else:
                print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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)
else:
    print(0)

Submission status: Wrong Answer

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
  if(y==2):
    answer+=200000
  elif(y==3):
    answer +=100000
  print(answer)

Submission status: Wrong Answer

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:
    x+=400000
print(c)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
prize = [300000, 100000, 200000]
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: Wrong Answer

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

Submission status: Wrong Answer

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 or y == 1:
    print(500000)
elif x == 2 and y == 2 or x == 3 and y == 1 or x == 1 or 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: Wrong Answer

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

Submission status: Wrong Answer

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 += 200000
    
    print(a)

solver(X, Y)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#DISCO presents ディスカバリーチャンネル コードコンテス a
def get_money(num):
    if num==3:
        return 100000
    elif num==2:
        return 200000
    else:
        return 300000
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: Wrong Answer

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

    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())
res = min(4-X, 0)*10**5 + min(4-Y, 0)*10**5
if X==Y==1:
  res += 400000
  
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
lst={0:0,1:300000,2:200000,3:1000000}
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: Wrong Answer

Solution code:
def p(n):
    if n == 1:
        return 300000
    elif n == 2:
        return 200000
    elif n == 3:
        return 300000
    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: Wrong Answer

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

Submission status: Wrong Answer

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] = 300000
B[3] = 300000

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
ans = 0
for v in a:
    if v == 1:
        ans += 300000
    elif v == 2:
        ans += 200000
    else:
        ans += 100000
if sum(a) == 2:
    ans += 400000
print(ans)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
ans = 0
for v in a:
    if v == 1:
        ans += 30000
    elif v == 2:
        ans += 20000
    else:
        ans += 10000
if sum(a) == 2:
    ans += 40000
print(ans)

Submission status: Wrong Answer

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

if ans==0:
    print("0000")
else:
    print(ans)

Submission status: Wrong Answer

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
X,Y = IL()
ans = 0
if X==Y==1:
  ans += 40000
if X==1:
  ans += 30000
if Y==1:
  ans += 30000
if X==2:
  ans += 20000
if Y==2:
  ans += 20000
if X==3:
  ans += 10000
if Y==3:
  ans += 10000
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y=list(map(int,input().split()))
awd=[300000,200000,100000]
ans=0
for xy in [x,y]:
    for ott in range(3):
        if xy==ott+1:
            ans+=awd[ott]

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

Submission status: Wrong Answer

Solution code:
a = sum(map(int,input().split()))
if a == 2:
    print("1000000")
elif a == 3:
    print("500000")
elif a == 4:
    print("400000")
elif a == 5:
    print("300000")
elif a == 6:
    print("200000")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
X,Y=map(int, input().split())
v1 = [300000, 200000, 100000]
v2 = [300000, 200000, 100000]
x = 0
y = 0
if X <= 3:
    x = int(v1[X-1])
if Y <= 3:
    y = int(v2[Y-1])
if (X==1 & Y==1):
    print(int(x + y + 400000))
else:
    print(int(x + y))

Submission status: Wrong Answer

Solution code:
X,Y=map(int, input().split())
v1 = [300000, 200000, 100000]
v2 = [300000, 200000, 100000]
x = 0
y = 0
if X <= 3:
    x = v1[X-1]
if Y <= 3:
    y = v2[Y-1]
if (X==1 & Y==1):
    print(int(x + y + 400000))
else:
    print(int(x + y))

Submission status: Wrong Answer

Solution code:
X,Y=map(int, input().split())
v = [300000, 200000, 100000]
x = 0
y = 0
if X <= 3:
    x = v[X-1]
if Y <= 3:
    y = v[Y-1]
if (X==1 & Y==1):
    print(int(x + y + 400000))
else:
    print(int(x + y))

Submission status: Wrong Answer

Solution code:
X,Y=map(int, input().split())
v = [300000, 200000, 100000]
x = 0
y = 0
if X <= 3:
    x = v[X-1]
if Y <= 3:
    y = v[Y-1]
if (X==1 & Y==1):
    print(x + y + 400000)
else:
    print(x + y)

Submission status: Wrong Answer

Solution code:
X,Y=map(int, input().split())
v = [300000, 200000, 100000]
x = 0
y = 0
if X <= 3:
    x = v[X-1]
if Y <= 3:
    y = v[Y-1]
print(x + y + 400000 * (X==1 & Y==1))

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
ans = 0
for z in [X,Y]:
  if z == 3:
    ans += 10**5
  elif z == 2:
    ans += 2*10**5
  elif z == 1:
    ans += 3*10**5
if X == Y:
  ans += 4*10**5
print(ans)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
print((max(4 - x, 0) + max(4 - y, 0)) * 10**5 if x > 1 < y else 10**6)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
a = 300000
b = 200000
c = 100000

if x == 1:
    if y==1:
        print(1000000)
    elif y==2:
        print(a+b)
    elif y==3:
        print(a+c)
    else:
        print(a)
if x == 2:
    if y==1:
        print(a+b)
    elif y==2:
        print(b+b)
    elif y==3:
        print(b+c)
    else:
        print(b)
if x == 3:
    if y==1:
        print(a+c)
    elif y==2:
        print(c+b)
    elif y==3:
        print(c+c)
    else:
        print(c)
if x>3 and y>3:
    print(0)

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
top_count = 0
ans = 0
for i in x:
  if i == 1:
    ans += 300000
    top_count += 1

  elif i == 2:
    ans += 200000

  elif i == 3:
    ans += 100000
    
if top_count != 0:
  print(ans + 400000)
else:
  print(ans)

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
top_count = 0
ans = 0
for i in x:
  if i == 1:
    ans += 300000
    top_count += 1

  elif i ==2:
    ans += 200000

  elif i == 3:
    ans += 100000
if top_count != 0:
  print(ans + 400000)
else:
  print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

p = 0
pr = [300000,200000,100000]

if(x < 3):p += pr[x-1]
if(y < 3):p += pr[y-1]

if(x == y and x == 1):p += 400000

print(p)

Submission status: Wrong Answer

Solution code:
x, y = [int(x) for x in input().split()]
ans = 0

for i in [x, y]:
    if x == 1:
        ans += 300000
    elif x == 2:
        ans += 200000
    elif x == 3:
        ans += 100000
    
if x == 1 and y == 1:
    ans += 400000

print(ans)

Submission status: Wrong Answer

Solution code:
x, y = [int(x) for x in input().split()]
ans = 0

for i in [x, y]:
    if x == 1:
        ans += 300000
    elif x == 2:
        ans += 200000
    elif x == 3:
        ans += 100000
    
if x == 1 and y == 1:
    ans += 400000

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if x<=3:
  if x==1:
    ans+=300000
  elif x==2:
    ans+=200000
  else:
    ans+=100000

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
prise = 0
for i in range(1,4):
  if x == i:
    prise += 300000 // i
  if y == i:
    prise += 300000 // i
if x + y == 2:
  prise += 400000

print(prise)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if x+y==2:
    print(1000000)
elif x+y==3:
    print(500000)
elif x+y==4:
    print(400000)
elif x+y==5:
    print(300000)
elif x+y==6:
    print(200000)
else:print(0)

Submission status: Wrong Answer

Solution code:
l = [300000,200000,100000]
a,b = map(int,input().split())
res = 0 
if a in range(1,4):
    res +=l[a-1]
if b in range(1,4):
    res +=l[b-1]

print(res)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
s=[0,]
d={
  1:30000,
  2:20000,
  3:10000,
}

if x in d:
  s.append(d[x])

if y in d:
  s.append(d[y])

if x==1 and y==1:
  s.append(40000)
  
print(sum(s))

Submission status: Wrong Answer

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

P = [300000, 200000, 100000, 0]

if X == 1 and Y == 1:
    print(100000)
else:
    print(P[min(3, X - 1)] + P[min(3, Y - 1)])

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
def point(a):
  if a == 1:
    return 300000
  elif a == 2:
    return 200000
  elif a == 3:
    return 100000
  else:
    return 0
  
a = point(x)
b = point(y)

if a == 1 and b == 1:
  print(1000000)
else:
  print(a+b)

Submission status: Wrong Answer

Solution code:
X , Y = map(int,input().split())
ans = 0
if X == 1 and Y == 1:
    ans += 1000000
elif X == 3:
    ans += 100000

elif X == 2 :
    ans += 200000

elif X == 1 :
    ans += 300000


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
codePlace, implePlace = map(int, input().split(" "))

priceDict = {
    "1":300000,
    "2":200000,
    "3":100000
}

totalPrice = priceDict[codePlace] if codePlace in priceDict.keys() else 0
totalPrice += priceDict[implePlace] if implePlace in priceDict.keys() else 0
totalPrice += 400000 if codePlace == 1 and implePlace == 1 else 0

print(totalPrice)

Submission status: Wrong Answer

Solution code:
a,b=list(map(int, input().split()))
new=[100000,200000,300000]
if a+b==2:
  print(1000000)
elif a<=3 and b<=3:
  print(new[a-1]+new[b-1])
elif a<=3:
  print(new[a-1])
elif b<=3:
  print(new[b-1])
else:
  print(0)

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
lis = [0]*205
lis[0] == 300000
lis[1] == 200000
lis[2] == 100000
if n == m and n == 1:
  print(1000000)
else:
  print(lis[n-1]+lis[m-1])

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
lis = [0]*205
lis[0] == 30000
lis[1] == 20000
lis[2] == 10000
if n == m and n == 1:
  print(1000000)
else:
  print(lis[n-1]+lis[m-1])

Submission status: Wrong Answer

Solution code:
def main(x: int, y: int):
    award = 0

    if (x and y) == 1:
        award += 400000

    for i in [x, y]:
        if i == 1:
            award += 300000
        elif i == 2:
            award += 200000
        elif i == 3:
            award += 100000

    print(award)


if __name__ == "__main__":
    x, y = map(int, input().split())

    main(x, y)

Submission status: Wrong Answer

Solution code:
n = [int(i) for i in input().split()]
T=0
for i in range(2):
        if n[i] == 1: T+=3
        elif n[i] == 1: T+=2
        elif n[i] == 3: T+=1
if sum(n)==2: T+=4
print(T*100000)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x + y == 2:
  print(1000000)
elif x + y == 3:
  print(500000)
elif x + y == 5:
  print(300000)
elif x + y == 4:
  print(400000)
elif x + y == 6:
  print(200000)
elif x + y >=5 and min(x,y) == 1:
  print(300000)
elif x + y >=5 and min(x,y) == 2:
  print(200000)
elif x + y >=5 and min(x,y) == 3:
  print(1000000000)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x + y == 2:
  print(100000)
elif x + y == 3:
  print(50000)
elif x + y == 5:
  print(30000)
elif x + y == 4:
  print(40000)
elif x + y == 6:
  print(20000)
elif x + y >=5 and min(x,y) == 1:
  print(30000)
elif x + y >=5 and min(x,y) == 2:
  print(20000)
elif x + y >=5 and min(x,y) == 3:
  print(10000)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
n=0
if X==1:
    n+=30
if X==2:
    n+=20
if X==3:
    n+=10
if Y==1:
    n+=30
if Y==2:
    n+=20
if Y==3:
    n+=10
if X==1 and Y==1:
    n+=40
print(n)

Submission status: Wrong Answer

Solution code:
from sys import stdin

input = stdin.readline

m, *t = map(int, open(0).read().split())


def cal(d, c):

    if c == 1:
        return [0, d]
    t = 1 + (d + d >= 10)
    a = (d + d >= 10) + (d + d) % 10

    ca = cal(a, c // 2)

    if c % 2:
        return [(c // 2) * t + ca[0] + 1 + (ca[1] + d >= 10), (ca[1] + d >= 10) + (ca[1] + d) % 10]
    else:
        return [(c // 2) * t + ca[0], ca[1]]


ans = 0
now = []
for d, c in zip(*[iter(t)] * 2):
    ca = cal(d, c)
    ans += ca[0]
    now.append(ca[1])

pre = 0
for i in now:
    pre = pre + i
    ans += 1
    if pre >= 10:
        ans += 1
        pre = pre % 10 + 1

print(ans - 1)

Submission status: Wrong Answer

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

s = [300000, 200000, 100000, 0]
print(s[min(a-1, 3)] + s[min(b-1, 3)] + 400000 if a == 1 and b == 1 else 0)

Submission status: Wrong Answer

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

s = [300000, 200000, 100000]
print(s[a-1] + s[b-1] + 400000 if a == 1 and b == 1 else 0)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
ans=0
if a<=3:
    ans+=(4-a)*10**5
if b<=3:
    ans+=(4-a)*10**5
if a==b==1:
    ans+=4*10**5
print(ans)

Submission status: Wrong Answer

Solution code:
#coding:utf-8

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

#coding:
if x == 1:
  money += 300000
elif x == 2:
  money += 200000
elif x == 3:
  money += 300000

#device:
if y == 1:
  money += 300000
elif y == 2:
  money += 200000
elif y == 3:
  money += 300000
  
#bonus
if x == 1 and y == 1:
  money += 400000

print(money)

Submission status: Wrong Answer

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

if x > 3 and y > 3:
  print("0")
elif x == 1:
  if y == 1:
    print("1000000")
  elif y == 2:
    print("500000")
  elif y == 3:
    print("400000")
elif x == 2:
  if y == 1:
    print("500000")
  elif y == 2:
    print("400000")
  elif y == 3:
    print("300000")
elif x == 3:
  if y == 1:
    print("400000")
  elif y == 2:
    print("300000")
  elif y == 3:
    print("200000")

Submission status: Wrong Answer

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

if x > 3 and y > 3:
  print("0")
elif x == 1:
  if y == 1:
    print("100000")
  elif y == 2:
    print("50000")
  elif y == 3:
    print("40000")
elif x == 2:
  if y == 1:
    print("500000")
  elif y == 2:
    print("40000")
  elif y == 3:
    print("30000")
elif x == 3:
  if y == 1:
    print("400000")
  elif y == 2:
    print("30000")
  elif y == 3:
    print("20000")

Submission status: Wrong Answer

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

points = [-1, 100000, 200000, 300000, 0]
print(400000*(X==Y==1) + points[min(4, X)] + points[min(4, Y)])

Submission status: Wrong Answer

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

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

elif X == 1 and Y == 2:
    print("500000")

elif X == 1 and Y == 3:
    print("400000")

elif X == 2 and Y == 3:
    print("300000")

elif X == 3 and Y == 2:
    print("300000")
    
elif X == 2 and Y == 1:
    print("500000")

elif X == 3 and Y == 1:
    print("400000")

elif X == 1 and Y >= 4:
    print("300000")

elif X == 2 and Y >= 4:
    print("200000")  

elif X == 3 and Y >= 4:
    print("100000")

elif X >= 4 and Y == 1:
    print("300000")

elif X >= 4 and Y == 2:
    print("200000")

elif X >= 4 and Y == 3:
    print("100000")

else:
    print("0")

Submission status: Wrong Answer

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

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

elif X == 1 and Y == 2:
    print("500000")

elif X == 1 and Y == 3:
    print("400000")

elif X == 2 and Y == 3:
    print("300000")
    
elif X == 2 and Y == 1:
    print("500000")

elif X == 3 and Y == 1:
    print("400000")

elif X == 1 and Y >= 4:
    print("300000")

elif X == 2 and Y >= 4:
    print("200000")  

elif X == 3 and Y >= 4:
    print("100000")

elif X >= 4 and Y == 1:
    print("300000")

elif X >= 4 and Y == 2:
    print("200000")

elif X >= 4 and Y == 3:
    print("100000")

else:
    print("0")

Submission status: Wrong Answer

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

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

elif X == 1 and Y == 2:
    print("500000")

elif X == 1 and Y == 3:
    print("400000")
    
elif X == 2 and Y == 1:
    print("500000")

elif X == 3 and Y == 1:
    print("400000")

elif X == 1 and Y >= 4:
    print("300000")

elif X == 2 and Y >= 4:
    print("200000")  

elif X == 3 and Y >= 4:
    print("100000")

elif X >= 4 and Y == 1:
    print("300000")

elif X >= 4 and Y == 2:
    print("200000")

elif X >= 4 and Y == 3:
    print("100000")

else:
    print("0")

Submission status: Wrong Answer

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

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

elif X == 1 and Y == 2:
    print("500000")

elif X == 1 and Y == 3:
    print("400000")
    
elif X == 2 and Y == 1:
    print("500000")

elif X == 3 and Y == 1:
    print("400000")

elif X == 1 and 4<=Y<=205:
    print("300000")

elif X == 2 and 4<=Y<=205:
    print("200000")  

elif X == 3 and 4<=Y<=205:
    print("100000")

elif 4<=X<=205 and Y == 1:
    print("300000")

elif 4<=X<=205 and Y == 2:
    print("200000")

elif 4<=X<=205 and Y == 3:
    print("100000")

else:
    print("0")

Submission status: Wrong Answer

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

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

elif X == 1 and Y == 2:
    print("500000")

elif X == 1 and Y == 3:
    print("400000")
    
elif X == 2 and Y == 1:
    print("500000")

elif X == 3 and Y == 1:
    print("400000")

elif X == 1 and 4<=Y<205:
    print("300000")

elif X == 2 and 4<=Y<205:
    print("200000")  

elif X == 3 and 4<=Y<205:
    print("100000")

elif 4<=X<205 and Y == 1:
    print("300000")

elif 4<=X<205 and Y == 2:
    print("200000")

elif 4<=X<205 and Y == 3:
    print("100000")

else:
    print("0")

Submission status: Wrong Answer

Solution code:
a, b = [int(x) for x in input().split()]
won = 0
if a in range(1, 4):
  won  += [0,300000,200000,200000][a]
if b in range(1, 4):
  won  += [0,300000,200000,100000][b]
if a == 1 and b == 1:won += 400000  

print(won)

Submission status: Wrong Answer

Solution code:
X, Y = [int(n) for n in input().split()]
V = {0: 400000, 1: 300000, 2: 200000, 3: 100000}
ans = 0
for i in [X, Y]:
    ans += V.setdefault(i, 0)
print(ans+V[0] if (X and Y ) == 1 else ans)

Submission status: Wrong Answer

Solution code:
_,*t=open(0)
a=-10
for t in t:d,c=map(int,t.split());a+=d*c+c*9
print(a//9)

Submission status: Wrong Answer

Solution code:
_,*t=open(0)
a=-18
for t in t:d,c=map(int,t.split());a+=d*c+c*9
print(~a//9)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
if X*Y == 1:
    print(10^6)
else:
  print(10^5*(max(0,4-X)+max(0,4-Y)))

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
if X*Y == 1:
    print(10^6)
else:
  print(10^5*(max(0,4-X)+max(0,4-X)))

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split());print((max(8-X-Y,0)+4*(X*Y<2))*10**5)

Submission status: Wrong Answer

Solution code:
x,y=[int(s) for s in input().split()]
ans=0
if x<4:
  ans+=10000
if x<3:
  ans+=10000
if x<2:
  ans+=10000
if y<4:
  ans+=10000
if y<3:
  ans+=10000
if y<2:
  ans+=10000
if x*y==1:
  ans+=40000
print(ans)