Problem:


Score : 100 points

Problem Statement

You have decided to give an allowance to your child depending on the outcome of the game that he will play now.

The game is played as follows:

There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a + printed on it.

The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)

Then, the amount of the allowance will be equal to the resulting value of the formula.

Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Constraints

All values in input are integers.

1 \leq A, B, C \leq 9

Input

Input is given from Standard Input in the following format:

A B C

Output

Print the maximum possible amount of the allowance.

Sample Input 1

1 5 2

Sample Output 1

53

The amount of the allowance will be 53 when the panels are arranged as 52+1, and this is the maximum possible amount.

Sample Input 2

9 9 9

Sample Output 2

108

Sample Input 3

6 6 7

Sample Output 3

82



Sample input:
1 5 2


Sample output:
53

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define debug(x) cerr << #x << " = " << x << "\n"
#define debugv(x) rep(i, x.size()) cerr << x[i] << (i == x.size() - 1 ? "\n" : " ")
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
const int INF = ((1LL << 30) + (1LL << 29));
const int MOD = 1000000007;

//=============================
int a,b,c;
//=============================
void input()
{
    cin>>a>>b>>c;
}

void solve()
{
    int m = max{a,b,c};
    cout<<m*10 +a+b+c-m<<endl;


}

//=============================
signed main()
{
    input();
    solve();
    return 0;
}

Submission status: Runtime Error

Solution code:
#include <assert.h>

#include <algorithm>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main() {
  std::vector<int> IN(3);
  cin >> IN[0] >> IN[1] >> IN[2];

  sort(IN.begin(), IN.end());
  cout << IN[2] *10 + IN[1] + IN[0]  << endl;
  return 0;
}

Submission status: Runtime Error

Solution code:

x =map(int,input())
x = sorted(x, reverse=True)

print(x[0] * 10 + x[1] + x[2])

Submission status: Runtime Error

Solution code:
import statistics
N = list(map(int,input().split()))
A = max(N)
B = min(N)
C = median(N)
print(A*10+B+C)

Submission status: Runtime Error

Solution code:
A, B, C = input()
print(max(int(A+B)+int(C),int(B+A)+int(C),int(A+C)+int(B), int(C+A)+int(B), int(B+C)int(A), int(C+B)+int(A)))

Submission status: Runtime Error

Solution code:
a, b, c = sorted(map(int,input().split())
print(c*10 + a + b )

Submission status: Runtime Error

Solution code:
a, b, c = sorted(map(int, input().split())
print(10*c+ a+ b)

Submission status: Runtime Error

Solution code:
n = sorted(list(map(int,input().split())),revese=True)
print(10*n[0]+n[1]+n[2])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print(max(abc)*10 + a + b + c - max(abc))

Submission status: Runtime Error

Solution code:
a,b,c=map(int(input()))
print(max(abc)*10 + a + b + c - max(abc))

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
b = sorted(a)
c = str(b[2])+str(b[1])
print(b[0]+c)

Submission status: Runtime Error

Solution code:
A,B,C=sorted(map(int,input.split()))
print(A+B+C*10)

Submission status: Runtime Error

Solution code:
A,B,C=sorted(map(int.input.split()))
print(A+B+C*10)

Submission status: Runtime Error

Solution code:
s=list(map(int,input().split())
s.sort()
print(max(10*s[0]+s[1]+s[2],s[0]+s[1]*10+s[2],s[0]+s[1]+s[2]*10))

Submission status: Runtime Error

Solution code:
*S = sorted(input().split(), reverse=True)
print(eval(S[0]+S[1]+ '+' + S[2]))

Submission status: Runtime Error

Solution code:
a = list(map(int,input()))
a.sort(reverse=True)
print(int(str(a[0])+str(a[1])) + a[2])

Submission status: Runtime Error

Solution code:
import math
m,n=map(int,input().split())
k=int(math.sqrt(n))
ju=[False for i in range(k+1)]
da=[]
ki=2
co=-1
while ki<k+1:
	if n%ki==0:
		n//=ki
		if ju[ki]:
			da[co]+=1
		else:
			co+=1
			da.append(1)
			ju[ki]=True
	else:
		ki+=1
co+=1
ans=1
for i in range(co):
	si=da[i]
	dp=[[0 for i in range(si+1)] for j in range(m+1)]
	dp[0][0]=1
	for j in range(1,m+1):
		for k in range(si+1):
			for l in range(k+1):
				dp[j][k]=(dp[j-1][l]+dp[j][k])%(1000000007)
	ans=(ans*dp[m][si])%(1000000007)
if n>1:
	ans=((ans*m)%1000000007)
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c = input().split()
print(max(int(a+b)+int(c),int(b+c)+int(a))

Submission status: Runtime Error

Solution code:

A = input()

lst_A = list(A)

lst_A.sort()

ans = int(lst_A[2]) * 10 + int(lst_A[0]) + int(lst_A[1])

print(ans)

Submission status: Runtime Error

Solution code:
A,B,C = map(int, input().split())
print(max(A,B,C)*9+sum(A,B,C))

Submission status: Runtime Error

Solution code:
from collections import Counter
 
s = input()
t = input()
 
c1 = Counter(s).most_common()
c2 = Counter(t).most_common()

for i, j in zip(c1, c2):
  if i[1] != j[1]:
    print('No')
    break
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
a, b, c = sorted(map(int, input()))
print(a + b + c * 10)

Submission status: Runtime Error

Solution code:
a = list[int(input().split()) for i in range(3)]
a.remove(max(a))
result = 0
for i in range(2):
    result += a[i]
print(int(max(a) * 10 + result))

Submission status: Runtime Error

Solution code:
a,b,c=sorted(input().split())
print(eval(f"{c}{b}+{a}"))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  vector<int> vec(3);
  for (int i = 0; i < 3; i++) {
  	cin >> vec[i];
  }
  sort(vec.begin(), vec.end());
  cout << vec.front() + vec.back() * 10 + vec[1] << '\n';
  return 0;
}

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri May 17 12:54:56 2019

@author: avina
"""

S = input()
T = input()
S_map = {}
T_map = {}
l = len(S)
k = 0
S_cnt = 0
T_cnt = 0
for i in range(l):
	s,t = S[i], T[i]
	if s in S_map:
		s_id = S_map[s]
	else:
		s_id = S_cnt
		S_map[s] = S_cnt
		S_cnt += 1
	if t in T_map:
		t_id = T_map[t]
	else:
		t_id = T_cnt
		T_map[t] = T_cnt
		T_cnt += 1
	if s_id != t_id:
		print("No");k+=1
		break
if k == 0:
    print("Yes")

Submission status: Runtime Error

Solution code:
import sequtils, strutils, math, algorithm, tables

var
  a = readLine(stdin).split().map(parseInt).sorted(cmp).reversed()

echo a[0] * 10 + a[1] + a[2]

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
d = max(a,b,c)
print(9 * d + sum(a,b,c))

Submission status: Runtime Error

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

k=max(a,b,c)

print(int(9k+a+b+c))

Submission status: Runtime Error

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

k=max(a,b,c)

print(int(10k+a+b+c-k))

Submission status: Runtime Error

Solution code:
import math

N,X = map(int,input().split())
x = list(map(int,input().split()))
if N == 1:
    print(abs(x[0] - X))
else:
    xlen = [abs(x[0]-X)]
    for i in range(N-1):
        xlen.append(x[i+1]- x[i])
    ans = xlen[0]
    for i in range(N-2):
        ans = math.gcd(ans,xlen[i+1])
    print(ans)

Submission status: Runtime Error

Solution code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
print('No War' if max(max(x),X)<min(min(y),Y) else 'War')

Submission status: Runtime Error

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

if (a>b) and (a>c):
    ans = 10*a+b+c
elif = (b>a) and (b>c):
    ans = 10*b+a+c
else:
    ans = 10*c+a+b
print(ans)

Submission status: Runtime Error

Solution code:
n_list=input().split()
n_list_int=[int(n) for n in n_list]
n_list_int.sort()
ans=n_list_sort[2]*10+n_list_sort[1]+n_list_sort[0]
print[ans]

Submission status: Runtime Error

Solution code:
list1 = list(map(int, input().split()))
list1 = sorted(list1, reverse=True)
print(list1[0]*10 +list[1]+list[2])

Submission status: Runtime Error

Solution code:
list1 = map(list(int, input().split()))
list1 = sorted(list1, reverse=True)
print(list1[0]*10 +list[1]+list[2])

Submission status: Runtime Error

Solution code:
nums = list(map(int, input().split()))
nums.sort()
print(nums[2] * 10 + num[1] + num[0])

Submission status: Runtime Error

Solution code:
l = list(map(int,input().split())).sort
print(l[2]*10 + l[1] + l[0])

Submission status: Runtime Error

Solution code:
def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

  
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod
  
  
N,M = map(int, input().split())
m_factorized = factorize(M)
mod = 10 ** 9 + 7
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
ans = 1
for i in range( 2, 2**N + 1 ):
  g1.append( ( g1[-1] * i ) % mod )
  inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
  g2.append( (g2[-1] * inverse[-1]) % mod )
    
    
for i in m_factorized:
  k = i[1] 
  ans *= cmb(N-1+k,k,mod)
  ans %= mod
print(ans)

Submission status: Runtime Error

Solution code:
a=int(input().split())
a.sort()
print(a[2]*10+a[1]+a[0])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
arr=[a,b,c]
arr=sorted(a,b,c)
print(10*arr[-1]+arr[1]+arr[0])

Submission status: Runtime Error

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

a=int(A)
b=int(B)
c=int(C)

if a>=b:
  if a>=c:
    x=a
    if b>=c:
      y=b
      z=c
      else:
        y=c
        z=b
    else:
      x=c
      y=a
      z=b
else:
  if b>=c:
    x=b
    if a>=c:
      y=a
      z=c
      else:
        y=c
        z=a
    else:
      x=c
      y=b
      z=a

n==x*100+y*10+z
print(n)

Submission status: Runtime Error

Solution code:
s = input()
t = input()
 
s_c = []
t_c = []
for c in 'abcdefghijklmnopqrstuvwxyz':
    s_c.append(s.count(c))
    t_c.append(t.count(c))
s_c.sort()
t_c.sort()
if s_c == t_c:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

print(sum(numbers) + max(numbers)*9)

Submission status: Runtime Error

Solution code:
numbers = [int(input()) for i in range(3)]

print(sum(numbers) + max(numbers)*9)

Submission status: Runtime Error

Solution code:
numbers = [int(input()) for i in range(3)]

numbers.sort()
numbers.reverse()

print(numbers[0]*10 + numbers[1] + numbers[2])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
x=max(a,b,c)
print(x*10+sum(a,b,c)-x)

Submission status: Runtime Error

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

ans = []

ans.append(10*a+b+c)
ans.append(10*b+a+c)
ans.append(10*c+b+a)

print(max(ans))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print(max(10*a+(b+c),10*b+(a+c),10*c+(a+c))

Submission status: Runtime Error

Solution code:
n = map(int, input().split())
n.sort()
print(n[2]*10 + n[1] + n[0])

Submission status: Runtime Error

Solution code:
num = [int(i) for i in input().split()]
num = num.sorted(reverse=True)
ans = 10*num[0] + num[1] + num[2]
print(ans)

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
a.sort(reversed = True)
print(int(a[0])*10+a[1]+a[2])

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
a.sort(reversed = True)
print(a[0]*10+a[1]+a[2])

Submission status: Runtime Error

Solution code:
a=list(map(int,input().split));print(sum(a)+max(a)*9)

Submission status: Runtime Error

Solution code:
data = [int(s) for s in input().split()]

N = data[0]
M = data[1]
X = data[2]
Y = data[3]

a = [int(i) for i in input().split()]
b = [int(j) for j in input().split()]

am = max(a)

bm = min(b)

x = bm -am

i = 0
f = 0

if am >= bm:
    print("War")

else:
    while x < bm:
        
        if x in range(X,Y):
            
            print("No War")
            f = 1
            break
        x += 1

    if f == 0:
        print("War")

Submission status: Runtime Error

Solution code:
data = [int(s) for s in input().split()]

N = data[0]
M = data[1]
X = data[2]
Y = data[3]

a = [int(i) for i in input().split()]
b = [int(j) for j in input().split()]

am = max(a)

bm = min(b)

x = bm -am

i = 0
f = 0

if am >= bm:
    print("War")

else:
    while x < bm:
        
        if x in range(X,Y):
            
            print("No War")
            f = 1
            break
        x += 1
if f == 0:
    print("War")

Submission status: Runtime Error

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

print(max([a, b, c])*10+sum([a,b,c])-max([a,b,c]))

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
print(A, B, C)
number = []
number.append([A, B, C])

number.sort()
print(number[2]*10 + number[1] + number[0])

Submission status: Runtime Error

Solution code:
l = input().split(" ").sort()
print(int(l[0] + l[1]) + int(l[2])

Submission status: Runtime Error

Solution code:
import collections as c
s=input()
t=input()
d=c.defaultdict(list)
d2=c.defaultdict(list)
for k,v in enumerate(s):
    d[v].append(k)
for k,v in enumerate(t):
    d2[v].append(k)
if list(d.values())==list(d2.values()):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def main():
    inputs = sorted([int(x) for x in input().split()])
    fst = inputs[-1]
    lst = inputs[0]
    mid = inputs[1]

    print(eval(f'{fst}{mid} + {lst}'))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main(){
    int a,b,c;
    cin>>a>>b>>c;
    cout<<max({a,b,c})*9+a+b+c;
}

Submission status: Runtime Error

Solution code:
print(eval('+'.join(input().sort())+'*10'))

Submission status: Runtime Error

Solution code:
from sys import stdin
a,b,c=[x for x in stdin.readline().rstrip().split()]
print(max(int(a)+int(b+c),int(a+b)+int(c))

Submission status: Runtime Error

Solution code:
in = list(map(int, input().split()))
print(max(in)*10+sum(in)-max(in))

Submission status: Runtime Error

Solution code:
n = list(map(int, input().split()))
nmax = max(n)
print(nmax * 10 + sum(n.remove(nmax)))

Submission status: Runtime Error

Solution code:
n = list(map(int, input().split()))
print(max(n) * 10 + sum(n.remove(nmax)))

Submission status: Runtime Error

Solution code:
S=input()
T=input()
al=[chr(ord('a')+i) for i in range(26)]
sameS=[]
sameT=[]

for k in al:
    indexes=[i for i, x in enumerate(S) if x==k]
    sameS.append(indexes)

for k in al:
    indexes=[i for i, x in enumerate(T) if x==k]
    sameT.append(indexes)

if all([x in sameS for x in sameT]) and all([x in sameT for x in sameS]):
    print('Yes')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
from sys import stdin
a, b, c = [int(i) for i in stdin.readline().rstrip().split()]

print(max([10 * a + b + c, a + 10 * b + c, a + b + 10 * c])

Submission status: Runtime Error

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

xl = list(map(int, input().split()))
yl = list(map(int, input().split()))

if max(xl + [x]) < min(yl + [y]):
    print("No War")
else:
    print("War")

Submission status: Runtime Error

Solution code:
n, m, X, Y = map(int, input().split())
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

x.append(X)
y.append(Y)

if max(x) < min(y):
    print("No War")
else :
    print("War")

Submission status: Runtime Error

Solution code:
a = list(input())
b = [int(i) for i in a]
c=sorted(b,reverse=True)
d =10*c[0]+c[1]+c[2]
print(int(d))

Submission status: Runtime Error

Solution code:
 = list(input())
b = [int(i) for i in a]
c=sorted(b,reverse=True)
d =10*c[0]+c[1]+c[2]
print(d)

Submission status: Runtime Error

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

if a>=b and a>=c:
  a=a*10
  print(a+b+c)
elif b>=a and b>=c:
  b=b*10
  print(a+b+c)
else
  c=c*10
  print(a+b+c)

Submission status: Runtime Error

Solution code:
import collections
s = input()
t = input()

d = {}
flag = True
for i in range(len(s)):
    if s[i] in d.keys():
        if t[i] == d[s[i]]:
            continue
        else:
            flag=False
            break
    elif t[i] in d.values():
        if d.get(s[i]) == t[i]:
            continue
        else:
            flag=False
            break
    else:
        d[s[i]] = t[i]

print("Yes" if flag else "No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
lis = list(map(int, input().split()))
lis.sort()
print(lis[2]*10 + lis[1] + lis[0])

Submission status: Runtime Error

Solution code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
#print(N,M,X,Y,x,y)
x.append(X)
y.append(Y)
if(max(x)>min(y)):
  print('War')
else:
  print('Np War')

Submission status: Runtime Error

Solution code:
a,b,c=[int(x) for x in input()]
print(max(a,b,c)*10+a+b+c-min(a,b,c))

Submission status: Runtime Error

Solution code:
n,m,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))

print(["War","No War"][X<min(y) and max(x)<Y and max(x)<min(y)])

Submission status: Runtime Error

Solution code:
n = input()

min_idx = 1
max_idx = len(n) - 1

sum_results = []
for i in range(min_idx, max_idx):
    n_inserted = n[:i] + '+' + n[i:]
    sum_results.append(eval(n_inserted))

print(max(sum_results))

Submission status: Runtime Error

Solution code:
mod = 10 ** 9 + 7
n, m = map(int, input().split())

f = []
p = 2
while p * p <= m:
    if m % p != 0:
        p += 1
        continue
    c = 0
    while m % p == 0:
        c += 1
        m //= p
    f.append(c)
    p += 1
if m != 1:
    f.append(1)


def comb(a, b):
    ret = 1
    r = min(b, a-b)
    for i in range(a-r+1, a+1):
        ret *= i
    for j in range(1, r+1):
        ret /= j
    return (int)(ret)


res = 1
for ele in f:
    ret = comb(ele+n-1, n-1)
    res *= ret

print(res % mod)

Submission status: Runtime Error

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

big = max([a,b,c])

print(sum[a,b,c] + 9*big)

Submission status: Runtime Error

Solution code:
x=sorted(input())
print(int(''.join(x[:-3:-1]))+int(x[0]))

Submission status: Runtime Error

Solution code:
A, B, C = list(map(int, input().split()))
li = [A,B,C].sort()
ans = sum(li[:2]) + li[2] * 10

print(ans)

Submission status: Runtime Error

Solution code:
s = input()
t = input()
for i in range(len(s)-2):
  if (s[i] == s[i+1]) != (t[i] == t[i+1]):
    print("No")
    exit()
print("Yes")

Submission status: Runtime Error

Solution code:
x = split(input()," ")
for i in range(len(x)):
  if int(x[i]) >= int(x[i-1]) and int(x[i]) >= int(x[i+1]):
    print (10*int(x[i])+int(x[i-1])+int(x[i+1]))

Submission status: Runtime Error

Solution code:
A = input()
B = input()
C = input()

if A>=B and B>=C:
    print(int(A+B)+int(C))
elif B>A and A>C:
    print(int(B+A)+int(C))
elif A>C and C>B:
    print(int(A+C)+int(B))
elif C>B and B>A:
    print(int(C+B)+int(A))
elif B>C and B>A:
    print(int(B+C)+int(A))
else:
    print(int(C+A)+int(B))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())

if A>=B and B>=C:
    print(int(str(A)+str(B))+C)
elif B>A and A>C:
    print(int(str(B)+str(A))+C)
elif A>C and C>B:
    print(int(str(A)+str(C))+B)
elif C>B and B>A:
    print(int(str(C)+str(B))+A)
elif B>C and B>A:
    print(int(str(B)+str(C))+A)
else:
    print(int(str(C)+str(A))+B)

Submission status: Runtime Error

Solution code:
A,B,C = map(int, input(),split())
L = sorted([A,B,C])
print(10*L[0]+L[1]+L[2])

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
L = sorted[A,B,C]
print(10*L[1]+L[2]+L[3])

Submission status: Runtime Error

Solution code:
import math
from scipy.misc import comb
 
N, M = map(int, input().split())
li1 = []
li2 = []
a = 1

for j in range(2, int(math.sqrt(M))):
    dest = int(math.sqrt(j))
    for i in range(2,dest):
        if j % i == 0:
            continue
    li1.append(j)

for k in range(len(li1)):
    if M % li1[k] != 0:
        continue
    c = 0
    x = M
    while x % li1[k] == 0:
        x = x / li1[k]
        c += 1
    li2.append(c)

for l in range(len(li2)):
    a *= comb(li2[l] + N - 1, N - 1)

print(int(a))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
A,B,C=map(int,input().split())
print(max(A*10+B+C, B*10+C+A C*10+A+B))

Submission status: Runtime Error

Solution code:
a=sort(list(int,input(),split())
b=str(a[2]+a[1])
print(int(b)+a[0])

Submission status: Runtime Error

Solution code:
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = min(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num[0])
print(int(two_num) +int(min_num))

Submission status: Runtime Error

Solution code:
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num[0])
print(int(two_num) +int(min_num))

Submission status: Runtime Error

Solution code:
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num)
print(int(two_num) + min_num)

Submission status: Runtime Error

Solution code:
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num[0])
print(int(two_num) + min_num)

Submission status: Runtime Error

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

max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))

two_num = str(max_num) + str(mid_num[0])
print(two_num + min_num)

Submission status: Runtime Error

Solution code:
A=sort(input(a),input(b),input(c))
print("a*10+b+c")

Submission status: Runtime Error

Solution code:
s  = list(str(input()))
t  = list(str(input()))

sd = {}
td = {}

for k in range(ord('a'),ord('z')+1):   
    sd[chr(k)] = 0
    td[chr(k)] = 0

for i in range(len(s)) :
    if s[i] in sd :
        sd[s[i]] = sd[s[i]] + 1

    if t[i] in td :
        td[t[i]] = td[t[i]] + 1
""" 
for k in range(ord('a'),ord('z')+1):   
    print(str(chr(k)) + ":",end="")
    if chr(k) in sd :
        print(str(sd[chr(k)]) + " ",end="")
    else:
        print("0 ",end="")
print()
for k in range(ord('a'),ord('z')+1):   
    print(str(chr(k)) + ":",end="")
    if chr(k) in td :
        print(str(td[chr(k)]) + " ",end="")
    else:
        print("0 ",end="")
print() """

ta = []
sa = []
for k in range(ord('a'),ord('z')+1):
    if td[chr(k)] != sd[chr(k)] : 
        if td[chr(k)] > 0 :
            ta.append(td[chr(k)])
        if sd[chr(k)] > 0 :    
            sa.append(sd[chr(k)])
#print(ta)
#print(sa)

ta.sort()
sa.sort()

if ta == sa :
    print("Yes")
else :
    print("No")

Submission status: Runtime Error

Solution code:
s  = list(str(input()))
t  = list(str(input()))
s.sort()
t.sort()

for i in range(len(s)):
 
    if s[i] != t[i]:
 
        c1 = s[i]
        c2 = t[i]
 
        for j in range(len(s)):
            if s[j] == c1:
                s[j] = c2
            elif s[j] == c2:
                s[j] = c1

if "".join(s) == "".join(t) :
    print("Yes")        
else :
    print("No")

Submission status: Runtime Error

Solution code:
ABC = list(map(int, input().split())) 
2.A = ABC[0]
3.B = ABC[1]
4.C = ABC[2]
5.print(max(A * 10 + B + C, A + B * 10 + C))

Submission status: Runtime Error

Solution code:
def prime(M_0):
    M = M_0
    lst = []
    i = 2
    while M != 1:
        if M % i == 0:
            lst.append(i)
            M = M // i
        elif len(lst) == 0 and i ** 2 > M_0:
            return [M_0]
        else:
            i += 1
    return lst


def counter(lst):
    dic = {}
    for i in lst:
        if i not in dic:
            dic[i] = 1
        else:
            dic[i] += 1
    return dic


def cmb(n, r, R):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k]) % R

    return result


R = 10 ** 9 + 7
N, M = map(int, input().split())
val = 1
for i in counter(prime(M)).values():
    val *= cmb(N + i - 1, i, R)
    if val >= R:
        val = val % R

print(val)

Submission status: Runtime Error

Solution code:
N, M, X, Y =map( int, input().split())
x = list(map( int, input().split()))
y = list(map( int, input().split()))
 
x = sorted(x)
y = sorted(y)
 
for i in range(X + 1, Y + 1):
  if( x[N-1] < i <= y[0]):
    print('No War')
    exit()
    
print('War')

Submission status: Runtime Error

Solution code:
N, M, X, Y =map( int, input()split())
x = list(map( int, input().split()))
y = list(map( int, input().split()))
 
x = sorted(x)
y = sorted(y)
 
for i in range(X + 1, Y + 1):
  if( x[N-1] < i <= y[0]):
    print('No War')
    exit()
    
  else:
    print('War')
    break

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
x =a*10 + b
y = b*10+ c
print([x, y][if x < y])

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
x =a*10 + b
y = b*10+ c
print([x, y] if x < y)

Submission status: Runtime Error

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

N = sorted(N)

Nmax = int(N[2] * 10 + N[1] + N[0])

print(int(Nmax))

Submission status: Runtime Error

Solution code:
N = input().split()
N.sort()
print(N)

N1 = N[2] + N[1]
print(int(Nmax) + int(N[0]))

Submission status: Runtime Error

Solution code:
    a,b,c=[int(i) for i in input().split()]
    print(max(a,b,c)*9+a+b+c)

Submission status: Runtime Error

Solution code:
a,b,c=[int(i) for i in input().split()
print(max(a,b,c)*9+a+b+c)

Submission status: Runtime Error

Solution code:
a,b,c = *sorted(list(map(int, input().split())))
print(a*10+b+c)

Submission status: Runtime Error

Solution code:
def com(n,m):
    if(n-m < m):
        m=n-m
    result=1
    mylist=[i for i in range(1,m+1)]
    j=1
    for i in range(1,m+1):
        result*=(n+1-i)
        if(j<m):
            while(result%mylist[j]==0):
                result//=mylist[j]
                j+=1
                if(j>=m):
                    break
    return result

def yakusuu(i,m):
    _i=i
    while(i**2<=m):
        if(m%i==0):
            return i
        else:
            i+=1
    for j in range(_i-1,0,-1):
        if(m%j==0):
            break
    return m//j
    

N,M=map(int,input().split())
soinsuubunkai={}
tmp=2
i=2
_M=M
while(tmp <=M):
    tmp=yakusuu(tmp,M)

    if(tmp in soinsuubunkai):
        soinsuubunkai[tmp]+=1
    else:
        soinsuubunkai[tmp]=1
    M//=tmp
    if(M==1):
        break


tmp=1
for k in list(soinsuubunkai.values()):
    tmp*=com(k+N-1,k)
    tmp%=10**9+7
print(tmp)

Submission status: Runtime Error

Solution code:
a,b,c=[int(i) for i in input().split()]
if(a>b &&a>c):
  print(10*a+b+c)
elif(b>a &&  b>c):
  print(10*b+c+a)
else:
  print(a+b+10+c)

Submission status: Runtime Error

Solution code:
n, m, X,Y = map(int,input().split())
x = list(int(i) for i in input().split())
y = list(int(i) for i in input().split())

x.sort()
y.sort()

if x[-1] < Y and y[0] >X and x[-1] < y[0]:
    print("No War")
else:
    print("War")

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
a = 10*A + B
b = 10*B + C
c = 10*C + A
d = 10*A + C
e = 10*B + A
f = 10*C +B
print(max([a+C ,b+A, c+B, d+B, e+C, f+A]))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
a = 10*A + B
b = 10*B + C
print(max([a+C ,A+b]))

Submission status: Runtime Error

Solution code:
a,b,c=map(int.input().split())
if a*10+b>b*10+c:
  print(a*10+b+c)
else:
  print(b*10+c+a)

Submission status: Runtime Error

Solution code:
N = int(input())

if N == 1:
  print("Hello World")
else if N == 2:
  A, B = map(int, input().split())
  print(A + B)

Submission status: Runtime Error

Solution code:
N M X Y = map(int, input.split())
 
 
x = []
for i in N:
    x.append(input())
    
y = []
for i in M:
    y.append(input())
    
def key_func(n):
    return int(n)
    
if min(x, key = key_func) > max(y key = key_func):
  print ("War")
elif X < max(y key = key_func) or Y > min(x key = key_func):
  print ("War")
else:
  print "No War"

Submission status: Runtime Error

Solution code:
N M X Y = map(int, input.split())
 
 
x = []
for i in N:
    x.append(input())
    
y = []
for i in M:
    y.append(input())
    
def key_func(n):
    return int(n)
    
if max(x, key = key_func) > min(y key = key_func):
  print ("War")
elif X < min(y key = key_func) or Y > max(x key = key_func):
  print ("War")
else:
  print "No War"

Submission status: Runtime Error

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


x = []
for i in N:
    x.append(input())
    
y = []
for i in M:
    y.append(input())
    
if max(x) > min(y):
  print ("War")
elif X < min(y) or Y > max(x):
  print ("War")
else:
  print "No War"

Submission status: Runtime Error

Solution code:
n = list(map(int,input().split())).sort()
print(n[2]*10+n[1]+n[0])

Submission status: Runtime Error

Solution code:
n = list(map(int,input(),split()))
n.sort()
n.reverse()
print(n[0]*10+n[1]+n[2])

Submission status: Runtime Error

Solution code:
l=list(map(int,input().split()))
l2=sort(l)
print(10*l2[2]+l2[1]+l2[0])

Submission status: Runtime Error

Solution code:
import Data.List
import Data.Ord

add x = x !! 0 + x !! 1 + 10* (x !! 2)

main = do
    x <- map read . words <$> getLine
    print $ add $ sort x

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
ans=[]
ans.append(a)
ans.append(b)
ans.append(c)
ans.sort(reverse=True)
temp=""
temp+=ans[0]
temp+=ans[1]
print(int(temp)+ans[2])

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())

a = A * 10 + B + C
b = A + B * 10 + C
c = A + B + C * 10
ans = 0
if a >= b:
    ans = a
else:
    ans = b
if c > ans:
    ans = c

print(ans)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())

a = A * 10 + B + C
b = A + B * 10 + C
c = A + B + C * 10
ans = 0
if a >= b:
    ans = a
else:
    ans = b
if c > ans:
    ans = c

print ans

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())

a = A * 10 + B + C
b = A + B * 10 + C
c = A + B + c * 10
ans = 0
if a >= b:
    ans = a
else:
    ans = b
if c > ans:
    ans = c

print ans

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
n,m,x,y = map(int,input().split())
xi = list(map(int,input().split()))
yi = list(map(int,input().split()))

xi.append(x)
yi.append(y)

xi.sort()
xi.reverse()
yi.sort()

if xi[0]<yi[0]:
    print("No War")
else:
    print("War")

Submission status: Runtime Error

Solution code:
a, b, c=input().split()
d=a+b
e=b+c
di=int(d)
ei=int(e)
ai=int(a)
if di >=ei:
    print(di+c)
else:
    print(ai+ei)