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:
def main():
    x, y = map(int, input().split())
    def get_prize(a):
        if a==1:
            return 300_000
        elif a==2:
            return 200_000
        elif a==3:
            return 100_000
        else:
            return 0
    a = 0
    a += get_prize(x)
    a += get_prize(y)
    a = a + 400_000 if a==600_000 else a
    print(a)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
try: 
	x,y=map(int,input().split())
except Exception:
 	exit(100)
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:
print(x,y)
point=0
if x == 1: 
    point = point + 300000
elif x == 2:
    point = point + 200000
elif x == 3:
    point = point + 100000
if y == 1: 
    point = point + 300000
    if x == 1:
        point = point + 400000
elif y == 2:
    point = point + 200000
elif y == 3:
    point = point + 100000
print(point)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x, y = map(int, input().split())
c = [0]*205
c[1], c[2], c[3] = 3, 2, 1
reword = c[x]+c[y]
if x+y == 2:
    reword += 4

print(reword*100000)

Submission status: Runtime Error

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

print(a+b)

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<4:
  rb += r[a]
if b<4:
  ra += r[b]

print(ra)

Submission status: Runtime Error

Solution code:
def test(n):
  m = 0
  if n == 3:
    m += 100000
  elif n == 2:
    m += 200000
  elif n == 1:
    m += 300000
  return m

x, y = int(input())
ans = test(x) + test(y)
if ans == 600000:
  ans += 400000

print(ans)

Submission status: Runtime Error

Solution code:
X, Y = map(int, input().split())
ans = 0
k = [3, 2, 1]
if X <= 3:
    ans += k[X-1]
if Y <= 3:
    ans += k[X-1]
if X == 1 and Y == 1:
    ans += 4
print(ans * 100000)

Submission status: Runtime Error

Solution code:
x, y = map(int, input().split())
ans = 0
if x <= 3:
    ans += 400_000 - x * 100_000
if y <= 3:
    ans += 400_000 - y * 100_000
if x == y == 1:
    ans += 400_000
print(ans)

Submission status: Runtime Error

Solution code:
def main():
    x, y = map(int, input().split())
    d = {1: 30_000, 2: 20_000, 3: 10_000}
    a = 0
    a += d.get(x, 0)
    a += d.get(y, 0)
    a = a + 40_000 if a==60_000 else a
    print(a)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Solution code:
#include <iostream>

using namespace std;

#define rep(i, n) for (int64_t i = 0; i < (n); i++)
#define irep(i, n) for (int64_t i = 0; i <= (n); i++)
#define rrep(i, n) for (int64_t i = (n)-1; i >= 0; i--)
#define rirep(i, n) for (int64_t i = n; i >= 0; i--)

int main()
{
    int x, y;
    cin >> x >> y;

    int score = 0;
    if (x == 1 && y == 1) {
        score += 400'000;
    }

    rep(i, 2)
    {
        switch (x) {
        case 1:
            score += 300'000;
            break;
        case 2:
            score += 200'000;

        case 3:
            score += 100'000;
        default:
            break;
        }
        swap(x, y);
    }

    cout << score << endl;

    return 0;
}

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <iomanip>
#include <string>
#include <stack>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <regex>
using namespace std;
using pii  = pair<int,int>;
using ll=long long;
using ld=long double;
#define pb push_back
#define mp make_pair
#define sc second
#define fr first
#define stpr setprecision
#define cYES cout<<"YES"<<endl
#define cNO cout<<"NO"<<endl
#define cYes cout<<"Yes"<<endl
#define cNo cout<<"No"<<endl
#define rep(i,n) for(ll i=0;i<(n);++i)
#define Rep(i,a,b) for(ll i=(a);i<(b);++i)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define rRep(i,a,b) for(int i=a;i>=b;i--)
#define crep(i) for(char i='a';i<='z';++i)
#define psortsecond(A,N) sort(A,A+N,[](const pii &a, const pii &b){return a.second<b.second;});
#define ALL(x) (x).begin(),(x).end()
#define debug(v) cout<<#v<<":";for(auto x:v){cout<<x<<' ';}cout<<endl;
#define endl '\n'
int ctoi(const char c){
  if('0' <= c && c <= '9') return (c-'0');
  return -1;
}
ll gcd(ll a,ll b){return (b == 0 ? a : gcd(b, a%b));}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
constexpr ll MOD=1000000007;
constexpr ll INF=1000000011;
constexpr ll MOD2=998244353;
constexpr ll LINF = 1001002003004005006ll;
constexpr ld EPS=10e-8;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
template<typename T> istream& operator>>(istream& is,vector<T>& v){for(auto&& x:v)is >> x;return is;}
template<typename T,typename U> istream& operator>>(istream& is, pair<T,U>& p){ is >> p.first; is >> p.second; return is;}
template<typename T,typename U> ostream& operator>>(ostream& os, const pair<T,U>& p){ os << p.first << ' ' << p.second; return os;}
template<class T> ostream& operator<<(ostream& os, vector<T>& v){
    for(auto i=begin(v); i != end(v); ++i){
        if(i !=begin(v)) os << ' ';
        os << *i;
    }
    return os;
}

int main(){
    ll X,Y,C=0;
    cin >> X >> Y;
    if(X==1){
        C+=300000;
    }
    if(Y==1){
        C+=300000;
    }
    if(X==2){
        C+=200000;
    }
    if(Y==2){
        C+=200000;
    }
    if(X==3){
        C+=100000;
    }
    if(Y==3){
        C+=100000;
    }
    if(X==1 && Y== 1){
        C+=400000;
    }
    cout << C <<  endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if 1<=y and y<=3:
    ans += d[x-1]

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

print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
//#define NDEBUG
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <iostream>
#include <vector>

namespace n91 {

using i8 = std::int_fast8_t;
using i32 = std::int_fast32_t;
using i64 = std::int_fast64_t;
using u8 = std::uint_fast8_t;
using u32 = std::uint_fast32_t;
using u64 = std::uint_fast64_t;
using isize = std::ptrdiff_t;
using usize = std::size_t;

struct rep {
  struct itr {
    usize i;
    constexpr itr(const usize i) noexcept : i(i) {}
    void operator++() noexcept { ++i; }
    constexpr usize operator*() const noexcept { return i; }
    constexpr bool operator!=(const itr x) const noexcept { return i != x.i; }
  };
  const itr f, l;
  constexpr rep(const usize f, const usize l) noexcept
      : f(std::min(f, l)), l(l) {}
  constexpr auto begin() const noexcept { return f; }
  constexpr auto end() const noexcept { return l; }
};
struct revrep {
  struct itr {
    usize i;
    constexpr itr(const usize i) noexcept : i(i) {}
    void operator++() noexcept { --i; }
    constexpr usize operator*() const noexcept { return i; }
    constexpr bool operator!=(const itr x) const noexcept { return i != x.i; }
  };
  const itr f, l;
  constexpr revrep(const usize f, const usize l) noexcept
      : f(l - 1), l(std::min(f, l) - 1) {}
  constexpr auto begin() const noexcept { return f; }
  constexpr auto end() const noexcept { return l; }
};
template <class T> auto md_vec(const usize n, const T &value) {
  return std::vector<T>(n, value);
}
template <class... Args> auto md_vec(const usize n, Args... args) {
  return std::vector<decltype(md_vec(args...))>(n, md_vec(args...));
}
template <class T> constexpr T difference(const T &a, const T &b) noexcept {
  return a < b ? b - a : a - b;
}
template <class T> void chmin(T &a, const T &b) noexcept {
  if (b < a)
    a = b;
}
template <class T> void chmax(T &a, const T &b) noexcept {
  if (a < b)
    a = b;
}
template <class T> T scan() {
  T ret;
  std::cin >> ret;
  return ret;
}

} // namespace n91

#include <algorithm>
#include <iostream>
#include <utility>

namespace n91 {

void main_() {
  /*
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  //*/
  const u32 x = scan<u32>();
  const u32 y = scan<u32>();
  u32 ans = 0;
  if (x == 3) {
    ans += 100000;
  } else if (x == 2) {
    ans += 200000;
  } else if (x == 1) {
    ans += 300000;
  }
  if (y == 3) {
    ans += 100000;
  } else if (y == 2) {
    ans += 200000;
  } else if (y == 1) {
    ans += 300000;
  }
  if (x == 1 && y == 1) {
    ans += 400000;
  }
  std::cout << ans << std::endl;
}

} // namespace n91

int main() {
  n91::main_();
  return 0;
}