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:
num = int(input()),int(input()),int(input())

num = list(num)

num.sort()
num.reverse()

print(int(str(num[0]) + str(num[1])) + num[2])

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
    S = list(input())
    T = list(input())

    letter = []
    for i in range(len(S)):
        letter.append(T[i])                                                                                                                                                     
        if S[i] == T[i]:
            continue
        else:
            if S[i] in letter:
                break
            else:
                s = S[i]
                for j in range(len(S)):
                    if S[j] == s:
                        S[j] = T[i]
                    elif S[j] == T[i]:
                        S[j] = s

    if S == T:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
num = [0,0,0]
num[0] = int(input())
num[1] = int(input())
num[2] = int(input())

num.sort()
num.reverse()

print(int(str(num[0]) + str(num[1])) + num[2])

Submission status: Runtime Error

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

li=[A,B,C]

max_num=max(li)
max_num2=-10000

for i in li:
    if max_num!=i and max_num2<i:
        max_num2=i
        
num1=int(str(max_num)+str(max_num2))
li.remove(max_num)
li.remove(max_num2)

print(int(num1)+li[0])

Submission status: Runtime Error

Solution code:
num = [0,0,0]
num[0] = int(input())
num[1] = int(input())
num[2] = int(input())

num.reverse()

print(int(str(num[0]) + str(num[1])) + num[2])

Submission status: Runtime Error

Solution code:
num = [0,0,0]
num[0] = int(input())
num[1] = int(input())
num[2] = int(input())

num.sort().reverse()

print(int(str(num[0]) + str(num[1])) + num[2])

Submission status: Runtime Error

Solution code:
num = [0,0,0]
num[0] = int(input())
num[1] = int(input())
num[2] = int(input())

num.sorted()

print(int(str(num[0]) + str(num[1])) + num[2])

Submission status: Runtime Error

Solution code:

array = list(map(int, input().strip().split()))
#array.sort(reverse = True)
N = array[0]
M = array[1]
X = array[2]
Y = array[3]

xarray = list(map(int, input().strip().split()))
xarray.sort(reverse = True)
##print(xarray)
xmax = xarray[0]

yarray = list(map(int, input().strip().split()))
yarray.sort()
##print(yarray)
ymin = yarray[0]
if (ymin > xmax):
    if((abs(ymin) - abs(xmax)) >= 1):
        print("No War")
    else:
        print("War")
else:
    print("War")

##print(array)

Submission status: Runtime Error

Solution code:
num = [0,0,0]
num[0] = int(input())
num[1] = int(input())
num[2] = int(input())

num.sort()

print(int(str(num[0]) + str(num[1])) + num[2])

Submission status: Runtime Error

Solution code:
num = []
num[0] = int(input())
num[1] = int(input())
num[2] = int(input())

num.sort()

print(int(str(num[0]) + str(num[1])) + num[2])

Submission status: Runtime Error

Solution code:
num[0] = int(input())
num[1] = int(input())
num[2] = int(input())

num.sort()

print(int(str(num[0]) + str(num[1])) + num[2])

Submission status: Runtime Error

Solution code:
n, m, x, y = [int(i) for i in input().split(" ")]
x_range = [int(i) for i in input().split(" ")]
y_range = [int(i) for i in input().split(" ")]
war = True
for z in range(x, y):
    if x < z <= y and max(x_range) < z <= min(y_range[:m]):
        war = False
print("War" if war else "No War")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())


if a < b:
    d = b
    another = a
else:
    d = a
    another = b

if d < c:
    d2 = str(d)
    d = str(c)

f = d + d2

print(int(f)+another)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())


if a < b:
    d = b
    another = a
else:
    d = a
    another = b

if d < c:
    d[0] = str(d)
    d[1] = str(c)

f = d[1] + d[0]

print(int(f)+another)

Submission status: Runtime Error

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

li=[A,B,C]

max_num=max(li)
max_num2=-10000

for i in range(3):
    if max_num!=i and max_num2<i:
        max_num2=i
        
num1=str(max_num)+str(max_num2)
li.remove(max_num)
li.remove(max_num2)

print(int(num1)+li[0])

Submission status: Runtime Error

Solution code:
def main():
	l = map(int, input().split())
	A=l[0]
	B=l[1]
	C=l[2]

	l_max=max(A,B,C)
	l_min=min(A,B,C)
	l_mid=(A+B+C)-(l_max+l_min)

	ans=10*l_max+l_mid+l_min
	print(ans)
    
main()

Submission status: Runtime Error

Solution code:
input_data = [int(i) for i in input().split(" ")]

ans = 0
for k1, v1 in enumerate(input_data):
    for k2, v2 in enumerate(input_data):
        for k3, v3 in enumerate(input_data):
            if k1 == k2 or k2 == k3 or k3 == k1:
                continue
            kou1 = int(f"{v1}{v2}")
            if ans < kou1 + v3:
                ans = kou1 + v3
print(ans)

Submission status: Runtime Error

Solution code:
N, M , X, Y = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
if X < Y and max(x) < min(y) and  min(y) > X and max(x) < Y:
    print('No War')
else:
    print('War')

Submission status: Runtime Error

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

m=max(a,b,c)

if m==a:
    print((a+10)+b+c)
elif:m==b:
    print((b+10)+a+c)
else:
    print((c+10)+a+b)

Submission status: Runtime Error

Solution code:
d = input().split()

a = int(d[0])
b = int(d[1])
c = int(d[2])

int e = 0

e = a*10+b+c

if e < b*10+a+c:
    e = b*10+a+c
    if e < c*10+a+b:
        e = c*10+a+b

if e < c*10+a+b:
    e= c*10+a+b
    if e < b*10+a+c:
        e = b*10+a+c

print(e)

Submission status: Runtime Error

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

ans=l[0]+l[1]+10*l[2]

print(ans)

Submission status: Runtime Error

Solution code:
def main():
    nums = sorted([int(i) for i in input().split()], reverse=True)
    max_num = 10 * nums[0] + nums[1] + nums[2]
    print(max_num)


if __name__ == '__main__':
    main()
Fujitakes-MacBook-Pro:tmp mas

Submission status: Runtime Error

Solution code:
# coding: utf-8

nums = input().split(" ")
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
num_list = [a, b, c]

max_num = max(num_list)
min_num = min(num_list)

if max_num == a:
	max_index = 0
elif max_num == b:
	max_index = 1
else:
	max_index = 2

if min_num == a and max_index != 0:
	min_index = 0
elif min_num == b and max_index != 1:
	min_index = 1
else:
	min_index = 2

index_list = [0, 1, 2]
del index_list[max_index]
del index_list[min_index]
middle_index = index_list[0]

answer = int( str(num_list[max_index]) + str(num_list[middle_index]) ) + num_list[min_index]

print(answer)

Submission status: Runtime Error

Solution code:
a, b, c = (int(i) for i in input().split())  
integers = [a, b, c]
integers = [a, b, c].sort()
print(integers[2]*10+integers[1]+integers[0])

Submission status: Runtime Error

Solution code:
data = input().split()
data = data.sort()
print(data[2]+data[1])

Submission status: Runtime Error

Solution code:
data = input().split()
print(data.sort()[2]+data.sort()[1])

Submission status: Runtime Error

Solution code:
A, B, C = map(int,input().split())
if A>B:
	print(A*10 +B+C)
elif A<B:
    print(A+B*10+C)
else:
	if A*10+B+C>A+B*10+C:
        print(A*10+B+C)
    else:
        print(A+B*10+C)

Submission status: Runtime Error

Solution code:
A,B,C=[int(i) for i in input().split()]
list=[]
list.append(A)
list.append(B)
list.append(C)
max=max(list)
list.remove(max)

return 10*max+sum(list)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
d = max(a)
a.remove(d)
ans(d*10+sum(a))

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
d = max(a)
a.remove(d)
ans(d*10+sum(a))

Submission status: Runtime Error

Solution code:
import numpy as np,math,itertools

a=[int(i) for i in input()]
b=a[1]
c=a[2]
d=a[0]
print(max([10*d+b+c,d+10*b+c]))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(np.max(a) * 9 + np.sum(a))