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: Runtime Error

Solution code:
X = int(input())

Y = int(input())

if X == 1 and Y == 1:
    print('{}'.format(1000000))
    exit()

ans = 0
if X == 1 or Y == 1:
    ans += 300000

if X == 2 or Y == 2:
    ans += 200000

if X == 3 or Y == 3:
    ans += 100000

print('{}'.format(ans))

Submission status: Runtime Error

Solution code:
def fun(x):
  if x==1:
    return 300000
  elif x==2:
    return 200000
  elif x==3:
    return 100000
s=input()
s=s.split()
a=eval(s[0])
b=eval(s[1])
su=0
if a==b==1:
    su+=400000
su+=fun(a)
su+=fun(b)
print(su)

Submission status: Runtime Error

Solution code:
# At Coder 1
def calculate_reward_earning_per_competition(rank):
    # Get input for ranking of both competition
        switcher = { 
            1: 300000, 
            2: 200000 , 
            3: 100000, 
        }
    # 4th ranking and below will recieve nothing 
        return switcher.get(rank, 0)
        
# Execution

# Getting ranking of Coding Contest and Robot Manuever
x = int(input("Enter your Coding Contest Ranking : "))
y = int(input("Enter your Robot Manuever Ranking: 100")) 
if x > 205 or x < 1 or y > 205 or y < 1:
    print("Nothing")
else:
    # Overall Winning Prize
    total_winning_prize = calculate_reward_earning_per_competition(x) + calculate_reward_earning_per_competition(y)
    if total_winning_prize == 600000:
        print(total_winning_prize + 400000)
    else:
        print(total_winning_prize)

Submission status: Runtime Error

Solution code:
import sys
import math

M=int(input())
ans=0
a=[list(map(int,input().split())) for i in range(M)]
b=[0 for i in range(M)]

for i in range(M):
    ans+=a[i][1]-1
    b[i]=a[i][0]*a[i][1]
    while b[i]>=10:
        ans+=b[i]//10
        b[i]=b[i]//10+b[i]%10


ans+=M-1 + sum(b)//10
print(int(ans))

Submission status: Runtime Error

Solution code:
def fun(x):
  if x==1:
    return 300000
  elif x==2:
    return 200000
  elif x==3:
    return 100000
s=input()
s=s.split()
a=eval(s[0])
b=eval(s[1])
sum+=fun(a)
sum+=fun(b)
print(sum)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
dif=9999999999999999999
x=-1
ans=0
for i in range(N):
  long=abs(sum(A[i+1:])-sum(A[:i+1]))
  if long<dif:
    dif=long
    x=i+1
pl=max(sum(A[:x]),sum(A[x:]))
mi=min(sum(A[:x]),sum(A[x:]))
while mi<pl:
  mi+=1
  ans+=1
  if mi==pl:
    break
print(ans)

Submission status: Runtime Error

Solution code:
x = int(input("Enter your Coding Contest Ranking: "))
y = int(input("Enter your Robot Manuever Ranking: "))
totalAmount = 0

if x == 1 and y == 1:
    totalAmount == 1000000
    print("DISCO-Kun total amount is " % totalAmount)
elif x == 1 and y == 2:
    totalAmount == 500000
    print("DISCO-Kun total amount is " % totalAmount)
elif x == 1 and y == 3:
    totalAmount == 400000
    print("DISCO-Kun total amount is " % totalAmount)
elif x == 2 and y == 2:
    totalAmount == 400000
    print("DISCO-Kun total amount is " % totalAmount)
elif x == 3 and y == 3:
    totalAmount == 200000
    print("DISCO-Kun total amount is " % totalAmount)
else:
    totalAmount == 0
    print("DISCO-Kun total amount is " % totalAmount)

Submission status: Runtime Error

Solution code:
x = int(input("Enter your Coding Contest Ranking: "))
y = int(input("Enter your Robot Manuever Ranking: "))

totalAmount = 0

if x == 1 and y == 1:
    totalAmount == 1000000
    print("DISCO-Kun total amount is " % totalAmount)
elif x == 1 and y == 2:
    totalAmount == 500000
    print("DISCO-Kun total amount is " % totalAmount)
elif x == 1 and y == 3:
    totalAmount == 400000
    print("DISCO-Kun total amount is " % totalAmount)
elif x == 2 and y == 2:
    totalAmount == 400000
    print("DISCO-Kun total amount is " % totalAmount)
elif x == 3 and y == 3:
    totalAmount == 200000
    print("DISCO-Kun total amount is " % totalAmount)
else:
    totalAmount == 0
    print("DISCO-Kun total amount is " % totalAmount)

Submission status: Runtime Error

Solution code:
#include <stdio.h>

int main()
{
   int total ,x ,y, a, b ,c ;
   a = 300000;
   b = 200000;
   c = 100000;
scanf("%d",&x);  
    if(x==1){
        x = a;
    }
    else if(x==2){
        x= b;
    }
    else if(x==3){
        x = c;
    }else {
        x=0;
    }
    scanf("%d",&y); 
if(y==1){
        y= a;
    }
    else if(y==2){
        y= b;
    }
     else if(y==3){
        y= c;
    }
    else{
        y=0;
    }
    if(x==a && y ==a) {
        total = (a*2)+400000;
    }
    else{
        total= x+y;
    }
   printf("%d", total);
    return 0;
}

Submission status: Runtime Error

Solution code:
String = input().split(" ")
X = int(String[0])
Y = int(String[1])
price = [300000, 200000, 100000]
rank = [1, 2, 3]
extra = 400000
if (X in rank):
    if (Y in rank):
        if X == 1 & Y == 1:
            X = X - 1
            Y = Y - 1
            total = price[X] + price[Y] + extra
            print(total)
        elif X >= 1 & Y > 1:
            X = X - 1
            Y = Y - 1
            total = price[X] + price[Y]
            print(total)
        else:
            X = X - 1
            Y = Y - 1
            total = price[X] + price[Y]
            print(total)
    else:
        X = X - 1
        total = price[X]
        print(total)
elif Y in rank:
        if X >= 1 & Y > 1:
            X = X - 1
            Y = Y - 1
            total = price[X] + price[Y]
            print(total)
        else:
            X = X - 1
            Y = Y - 1
            total = price[X] + price[Y]
            print(total)
else:
  total = 0
  print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
X = int(input())
Y = int(input())
price = [300000, 200000, 100000]
rank = [1, 2, 3]
extra = 400000
if (X in rank) & (Y in rank):
    if X == 1 & Y == 1:
        X = X - 1
        Y = Y - 1
        total = price[X] + price[Y] + extra
        print(total)
    elif X >= 1 & Y > 1:
        X = X - 1
        Y = Y - 1
        total = price[X] + price[Y]
        print(total)
    else:
        X = X - 1
        total = price[X]
        print(total)
else:
  total = 0
  print(total)

Submission status: Runtime Error

Solution code:
x, y = input(), input()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 or int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)

Submission status: Runtime Error

Solution code:
p=[int(x) for x in input().split()]
x,y=map(int,input().split())
l=[3000,2000,1000]
s=0
if x==1 and y==1:
    print(10000)
if x<4:
    s=s+l[x-1]
if y<4:
    s=s+l[y-1]
print(s)

Submission status: Runtime Error

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

def getTargetIndex():
    diffList = []
    for i in range(0,n-1):
        left = 0
        right = 0
        left = list[:i+1]
        right = list[i+1:]
        diffList.append(abs(sum(left)- sum(right)))  
    return list.index(min(diffList))

div = getTargetIndex()
left = list[:div]
right = list[div:]
print(abs(sum(left) -sum(right)) )

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split())
ttl=0
if x>3 and y>3:
  #do nothing
else:
  for i in range(1,4):
    ttl=(4-i)*100000
    for j in range(1,4):
    	ttl=ttl+(4-j)*100000
        break
  if ttl==600000:
    ttl=ttl+400000
print(ttl)

Submission status: Runtime Error

Solution code:
X = int(input())
Y = int(input())
price = [300000, 200000, 100000]
rank = [1, 2, 3]
extra = 400000
if X in rank:
    if Y in rank:
        if X == 1 & Y == 1:
            X = X - 1
            Y = Y - 1
            total = price[X] + price[Y] + extra
            print(total)
        elif X >= 1 & Y > 1:
            X = X - 1
            Y = Y - 1
            total = price[X] + price[Y]
            print(total)
        else:
            X = X - 1
            Y = Y - 1
            total = price[X] + price[Y]
            print(total)
    else:
        X = X - 1
        total = price[X]
        print(total)
else:
  total = 0
  print(total)

Submission status: Runtime Error

Solution code:
# At Coder 1
def calculate_reward_earning_per_competition(rank):
  # Get input for ranking of both competition
    switcher = { 
        1: 300000, 
        2: 200000 , 
        3: 100000, 
    }
   # 4th ranking and below will recieve nothing 
    return switcher.get(rank, 0)

# Execution
# Getting ranking of Coding Contest and Robot Manuever
x = int(input("Enter your Coding Contest Ranking: "))
y = int(input("Enter your Robot Manuever Ranking")) 
# Overall Winning Prize
total_winning_prize = calculate_reward_earning_per_competition(x) + calculate_reward_earning_per_competition(y)
if total_winning_prize == 600000:
  print(total_winning_prize + 400000)
else:
  print(total_winning_prize)

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split())
def fun(x):
	price=0
	if x==3:
		price=100000
	elif x==2:
		price=200000
	elif x==1:
		price=300000
	return price
if x ==1 and y ==1:
	print(fun(x)+fun(y)+4Ω00000)
else:
	print(fun(x)+fun(y))

Submission status: Runtime Error

Solution code:
p=[int(x) for x in input().split()]
s=0
if p[0]==1 and p[1]==1:
	print(10000)
elif p[0]<4 and p[1]<4:
	for i in range(2):
    	if p[i]==1:
        	s=s+3000
        elif p[i]==2:
            s=s+2000
        elif p[i]==3:
            s=s+1000
        else:
        	pass
    print(s)
else:
	print(s)

Submission status: Runtime Error

Solution code:
x = input("input rank 1:")
y = input("input rank 2:")
int total=0
if x == 1:
  total += 300000
if y == 1:
  total += 300000
if x == 2:
  total += 200000
if y == 2:
  total += 200000
if x == 3:
  total += 100000
if y == 3:
  total += 100000
if x ==1 and y == 1:
  total += 400000
print("total=", total)

Submission status: Runtime Error

Solution code:
p=[int(x) for x in input().split()]
s=0
if p[0]==1 and p[1]==1:
	print(10000)
else:
	for i in range(2):
    	if p[i]==1:
        	s=s+3000
        elif p[i]==2:
            s=s+2000
        elif p[i]==3:
            s=s+1000
        else:
        	pass
    print(s)

Submission status: Runtime Error

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

sum = 0
flag = 0

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

if y == 1:
  if flag = 1:
    sum += 700000
  else:
    sum += 300000
elif y == 2:
  sum += 200000
elif y == 3:
  sum += 100000
  
print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if a==1:
  s=300000
elif a==2:
  s=200000
elif a==3:
  s=100000
else:
  pass
if b==1:
  g=300000
elif b==2:
  g=200000
elif b==3:
  g=100000
else:
  pass
if a==1 and b==2:
  print(g+s+400000)
else:
  print(s+g)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
list = [500000,300000,200000,100000,0]
if(A>3):
    A = 4
elif(B>3):
    B = 4
elif(A==1 and B==1):
    A=B=0
money = list[A]+list[B]
print(money)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
p=[int(x) for x in input().split()]
l=[3000,2000,1000]
s=0
if p[0]==1 and p[1]==1:
	print(10000)
else:
	for i in [0,1]:
    	if p[i]==1:
        	s=s+l[0]
        elif p[i]==2:
            s=s+l[1]
        elif p[i]==3:
            s=s+l[2]
    print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=int(input().split())
s=0
g=0
if a==1:
  s=300000
elif a==2:
  s=200000
elif a==3:
  s=100000
else:
  pass
if b==1:
  g=300000
elif b==2:
  g=200000
elif b==3:
  g=100000
else:
  pass
if a==1 and b==2:
  print(g+s+400000)
else:
  print(s+g)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = -1
num = 0
for i in range(n):
    a,b = map(int,input().split())
    ans += b
    num += a * b
    if num > 9:
        ans += num // 9
        num %= 9
        if num == 0:
            ans -= 1
            num = 9
print(ans)

Submission status: Runtime Error

Solution code:
ああ

Submission status: Runtime Error

Solution code:
a,b=int(input().split())
s=0
g=0
if a==1:
  s=300000
elif a==2:
  s=200000
elif a==3:
  s=100000
else:
  pass
if b==1:
  g=300000
elif b==2:
  g=200000
elif b==3:
  g=100000
else:
  pass
if a=1 and b=2:
  print(g+s+400000)
else:
  print(s+g)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
X = input('input the place in coding contest: ')
Y = input('input the place in robot maneuver: ')

totalAmount = 0
first = 300000
second = 200000
third = 100000
extraPrice = 400000
rejected = 0

if X == 1:
    if Y == 1:
        totalAmount = first + first + extraPrice
    elif Y == 2:
        totalAmount = first + second
    elif Y == 3:
        totalAmount = first + third
    elif Y < 1 or Y > 3:
        totalAmount = first
elif X == 2:
    if Y == 1:
        totalAmount = second + first
    elif Y == 2:
        totalAmount = second + second
    elif Y == 3:
        totalAmount = second + third
    elif Y < 1 or Y > 3:
        totalAmount = second
elif X == 3:
    if Y == 1:
        totalAmount = third + first
    elif Y == 2:
        totalAmount = third + second
    elif Y == 3:
        totalAmount = third + third
    elif Y < 1 or Y > 3:
        totalAmount = third
elif X < 1 or X > 3:
    if Y == 1:
        totalAmount = first
    elif Y == 2:
        totalAmount = second
    elif Y == 3:
        totalAmount = third
    elif Y < 1 or Y > 3:
        totalAmount = rejected
print(totalAmount)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def func(A):
    A_inf = 0
    A_sup = 0
    N_inf = 0
    N_sup = 0
    L = sum(A)

    for a in A:
        if A_inf + a <= L/2:
            A_inf += a
            A_sup += a
            N_inf += 1
            N_sup += 1

        if A_sup <= L/2 and A_sup + a > L/2:
            A_sup += a
            N_sup += 1

    if A_inf == A_sup:
        return 0
    x = sum(A) - 2*A_inf
    y = 2*A_sup - sum(A)
    result = min(x,y)

    if A_sup - y < N_sup:
        return x
    else:
        return result

print(func(A))

Submission status: Runtime Error

Solution code:
X = int(input('input the place in coding contest: '))
Y = int(input('input the place in robot maneuver: '))

totalAmount = 0
first = 300000
second = 200000
third = 100000
extraPrice = 400000
rejected = 0

if X == 1:
    if Y == 1:
        totalAmount = first + first + extraPrice
    elif Y == 2:
        totalAmount = first + second
    elif Y == 3:
        totalAmount = first + third
    elif Y < 1 or Y > 3:
        totalAmount = first
elif X == 2:
    if Y == 1:
        totalAmount = second + first
    elif Y == 2:
        totalAmount = second + second
    elif Y == 3:
        totalAmount = second + third
    elif Y < 1 or Y > 3:
        totalAmount = second
elif X == 3:
    if Y == 1:
        totalAmount = third + first
    elif Y == 2:
        totalAmount = third + second
    elif Y == 3:
        totalAmount = third + third
    elif Y < 1 or Y > 3:
        totalAmount = third
elif X < 1 or X > 3:
    if Y == 1:
        totalAmount = first
    elif Y == 2:
        totalAmount = second
    elif Y == 3:
        totalAmount = third
    elif Y < 1 or Y > 3:
        totalAmount = rejected
print(totalAmount)

Submission status: Runtime Error

Solution code:
X=int(input())
Y=int(input())

score={1:300000,2:200000,3:300000}
ans=0

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

if X < 4:
  ans+=score[X]

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

print(ans)

Submission status: Runtime Error

Solution code:
first_value = 300000
second_value = 200000
third_value = 100000
def assign(x):
    if (x == 1):
        x = first_value
    elif (x == 2):
        x = second_value
    elif (x == 3):
        x = third_value
    return x

data1 = int(input())
x = assign(data1)
data2 = int(input())
y = assign(data2)

if (x == 300000 and y == 300000):
    print(1000000)
else:
    print(x + y)

Submission status: Runtime Error

Solution code:
n = int(input())
aaa = map(int, input().split())

length = 0
lengths = []
for a in aaa:
  length += a
  lengths.append(length)
  
diff = 200000 * 2020202020
for l in lengths:
  if abs(l - (length - l)) < diff:
    diff = abs(l - (length - l))
  else:
    break
    
print(diff)

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split())
if x==1 and y==1:
  print(1000000)
elif x<=3 and y>=4 x>=4 or y<=3:
  print(x*10000)

Submission status: Runtime Error

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

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

if x == 1 and y == 1:
	print(10**6)
	exit()

su = 0
if x in d:
	su += d[x]
if y in d:
	su += d[x]
print(su)

Submission status: Runtime Error

Solution code:
X=int(input())
Y=int(input())

score={1:300000,2:200000,3:300000}
ans=0

if 3<X and 3<Y:
    ans= 0
elif X==1 and Y==1:
    ans+=400000

if X < 4:
  ans+=score[X]

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

print(ans)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
list = [300000,200000,100000,0]
if(A>3 or A<0):
    A = 4
elif(B>3 or B<0):
    B = 4
money = list[A-1]+list[B-1]
if(A==1 and B==1):
    money = 1000000
print(money)

Submission status: Runtime Error

Solution code:
N = int(input())
s = raw_input().split()
A = [0]*N

for i in range(N):
    A[i] = int(s[i])

#print N, A

h = 0
t = N-1
lh = 0
lt = 0

for i in range(N):
    if (lh > lt):
        lt += A[t]
        t -= 1
    else:
        lh += A[h]
        h += 1
    #print h, t, lh, lt, A[h+1:t-1]

print abs(lh-lt)

Submission status: Runtime Error

Solution code:
x=int(input())
y=int(input())
if x==1 and y==1:
  print(1000000)

Submission status: Runtime Error

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

prize=0

if X==1:
    prize+=300000
    if Y==1:
        pprize+=700000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
elif X==2:
    prize+=200000
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
elif X==3:
    prize+=100000
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
else:
    prize+=100000
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass

print(prize)

Submission status: Runtime Error

Solution code:
a = input().split()
x = int(a[0])
y = int(a[1])
def h(x,y):
    d = {1:300000,2:200000,1:100000}
    if x==1 and y ==1:
        return 1000000
    print(d.get(x)+y.get(y))
h(x,y)

Submission status: Runtime Error

Solution code:
x=int(input())
y=int(input())
if x==1 and y==1:
  print(1000000)
elif x==1 and y==2 or x==2 and y==1:
  print(500000)
elif x==1 and y==3 or x==3 and y==1 or x==2 and y==2:
  print(400000)
elif x==3 and y==3:
  print(200000)
elif x==1 and y>=4 or x>=4 and y==1:
  print(300000)
elif 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:
  pass

Submission status: Runtime Error

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

prize=0

if X==1:
    prize+=300000
    if Y==1:
        pprize+=700000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
elif X==2:
    prize+=200000
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
elif X==3:
    prize+=100000
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass

print(prize)

Submission status: Runtime Error

Solution code:
total = 0
for i in map(int, input().split()):
    if i == 1:
        total=total+300000
    elif i == 2:
        total=total+200000
    elif i == 3:
        total=total+100000
if total==600000:
    total=1000000
print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A_list = [int(item) for item in input().split()]

mini = 2020202020 * 200000
for j in range(1,N):
    F, B = A_list[:j], A_list[j:]
    delta = abs(sum(F) - sum(B))
    if delta <= mini:
        mini = delta

print(mini)

Submission status: Runtime Error

Solution code:
n=0
for i in map(int, input().split()):
    if i==1:
        n+= 300000
    elif i==2:
        n+= 200000
    elif i==3:
        n+= 100000
if n==600000:
    n=1000000
print(n)

Submission status: Runtime Error

Solution code:
, b = map(int, input().split())
firstprize =  300000
secondprize = 200000
thirdprize = 100000
result = 0

if (a == 1 and b == 1):
    result = firstprize + firstprize + 400000
    print(result)
elif ((a == 1 and b == 2) or (a == 2 and b == 1) ):
    result = firstprize + secondprize 
    print(result)
elif ((a == 1 and b == 3) or a == 3 and b == 1):
    result = firstprize + thirdprize
    print(result)
elif ((a > 3 and b == 1) or (a == 1 and b > 3)):
    result = firstprize
    print(result)
elif ((a > 3 and b == 2) or (a == 2 and b > 3)):
    result = secondprize
    print(result)
elif (((a > 3 and b == 3) or (a == 3 and b > 3))):
    result = thirdprize
    print(result)
elif ((a == 1) and (b == 1)):
    result = firstprize + firstprize + 400000
    print(result)
elif ((a == 2) and ( a == 2)):
    result = secondprize + secondprize
    print(result)
elif ((a == 3) and (b == 3)):
    result = thirdprize + thirdprize
    print(result)
elif (a == 0 or b == 0):
    raise Exception('Enter greater than 0')
else:
    result = 0
    print(result)

Submission status: Runtime Error

Solution code:
aw = 0
for i in map(int, input().split()):
    if i == 1:
        s+=300000
    elif i ==2 :
        s+= 200000
    elif i ==3 :
        s+= 100000
if aw== 600000:
    aw= 1000000
print(aw)

Submission status: Runtime Error

Solution code:
X, Y = [int(item) for item in input().split()]

res = 0

if X == 1:
    res += 300_000
elif X == 2:
    res += 200_000
elif X == 3:
    res += 100_000

if Y == 1:
    res += 300_000
elif Y == 2:
    res += 200_000
elif Y == 3:
    res += 100_000

if X ==1 and Y == 1:
    res += 400_000

print(res)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
list = [300000,200000,100000,0]
if(A>3):
    A = 4
elif(B>3):
    B = 4
money = list[A-1]+list[B-1]
if(A==1 and B==1):
    money = 1000000
print(money)

Submission status: Runtime Error

Solution code:
a = 0 
for i in map(int, raw_input().split()):
  if i == 1:
  	a+=300000
  elif i == 2:
  	a+=200000
  elif i == 3:
  	a+=100000
if a == 600000:
   a =  1000000
print(a)

Submission status: Runtime Error

Solution code:
total = 0
for i in map(int, input().split()):
    if i == 1:
        total+= 300000
    elif i == 2:
        total+= 200000
    elif i == 3:
        toal+= 100000
if total == 600000:
    total = 1000000
print(total)

Submission status: Runtime Error

Solution code:
'''  Hariom_Pandey
      23.11.2019   '''

import math as mt
import sys as sy
import numpy as np
import operator as op
import time as tt
import functools
from collections import Counter, deque, defaultdict

hari,om = map(int, sy.stdin.readline().split())
if(hari==1 and om==1):
    print(300000+300000+400000)
elif(hari==2 and  om==2):
    print(200000*2)
elif(hari==3 and om==3):
    print(100000*2)
elif(hari==1 and om>3   ):
    print(300000)
elif(hari==2 and om>3 ):
    print(200000)
elif(hari==3 and om>3 ):
    print(100000)
elif(hari >3 and om>3):
    print(0)
elif(hari==2 and om==3 or om==3 and hari==2):
    print(200000+100000)
elif(hari==1 and om==2 or hari==2 and om==1):
    print(300000+200000)
elif(hari==3 and om==1 or om==3 and hari==1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = int(input())
y + int(input())
sum = 0
if x ==1 and y ==1:
  sum += 400000

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

print(sum)

Submission status: Runtime Error

Solution code:
from math import gcd

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

a = [0, 300000, 200000, 100000, 0]
ans = 0

x = min(x, 4)
y = min(y, 4)

ans = a[x] + a[y]
if x == 1 and y == 1:
    ans += 400000

print(ans)

Submission status: Runtime Error

Solution code:
def calculateTotalAmount(x, y):
    totalAmount = 0
    if x == 1:
        if y == 1:
            totalAmount = 300000 + 300000 + 400000
        elif y == 2:
            totalAmount = 300000 + 200000
        elif y == 3:
            totalAmount = 300000 + 100000
        else:
            totalAmount = 300000
    elif x == 2:
        if y == 1:
            totalAmount = 200000 + 300000
        elif y == 2:
            totalAmount = 200000 + 200000
        elif y == 3:
            totalAmount = 200000 + 100000
        else:
            totalAmount = 200000
    elif x == 3:
        if y == 1:
            totalAmount = 100000 + 300000
        elif y == 2:
            totalAmount = 100000 + 200000
        elif y == 3:
            totalAmount = 100000 + 100000
        else:
            totalAmount = 100000
    else:
        if y == 1:
            totalAmount = 300000
        elif y == 2:
            totalAmount = 200000
        elif y == 3:
            totalAmount = 100000
        else:
            totalAmount = 0
    return totalAmount


X = int(input('input the place in coding contest: '))
Y = int(input('input the place in robot maneuver: '))

totalAmount = calculateTotalAmount(X, Y)
print(totalAmount)

Submission status: Runtime Error

Solution code:
raw_input = input()
input_list = inp.split()   

coding_contest_rank = int(input_list[0])
robot_rank = int(input_list[1])

if coding_contest_rank == 3 or robot_rank == 3:
  coding_money = 100000
  robot_money = 100000
elif coding_contest_rank == 2 or robot_rank == 2:
  coding_money = 200000
  robot_moeny = 200000
elif coding_contest_rank == 1 or robot_rank == 1:
  coding_money = 300000
  robot_moeny = 300000
elif coding_contest_rank == 1 and robot_rank == 1:
  print(1000000)
  break

print(coding_money + robot_money)

Submission status: Runtime Error

Solution code:
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
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 == 3 or Y == 3:
  	if X == 2 or Y == 2:
    	print(300000)
    elif X == 3 and Y == 3:
      	print(200000)
    else:
    	print(100000)
elif X == 2 or Y ==2:
    print(200000)
elif X == 1 or Y == 1:
    print(300000)
else:
    print(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

list = [300000,200000,100000,0]

if(A>3):
    A = 4
elif(B>3):
    B = 4

money = list[A-1]+list[B-1]


if(A==1 and B==1):
    money = 1000000

print(money)

Submission status: Runtime Error

Solution code:
a,b = list(map(int, input().split()))
r=[300000, 200000, 100000]
ra=0
if a+b==2:
  print('1000000')
  exit()
if a<3:
  rb += r[a]
if b<3:
  ra += r[b]
 
print(ra)

Submission status: Runtime Error

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

prize_list = [100000, 200000, 300000]

ans = prize_list[3-X] + prize_list[3-Y]
if X == 1 and Y == 1:
    ans += 400000
print(ans)