Problem:


Score: 200 points

Problem Statement

There are three positive integers A, B and C written on a blackboard. E869120 performs the following operation K times:

Choose one integer written on the blackboard and let the chosen integer be n. Replace the chosen integer with 2n.

What is the largest possible sum of the integers written on the blackboard after K operations?

Constraints

A, B and C are integers between 1 and 50 (inclusive).

K is an integer between 1 and 10 (inclusive).

Input

Input is given from Standard Input in the following format:

A B C
K

Output

Print the largest possible sum of the integers written on the blackboard after K operations by E869220.

Sample Input 1

5 3 11
1

Sample Output 1

30

In this sample, 5, 3, 11 are initially written on the blackboard, and E869120 can perform the operation once.

There are three choices:  

Double 5: The integers written on the board after the operation are 10, 3, 11.

Double 3: The integers written on the board after the operation are 5, 6, 11.

Double 11: The integers written on the board after the operation are 5, 3, 22.

If he chooses 3., the sum of the integers written on the board afterwards is 5 + 3 + 22 = 30, which is the largest among 1. through 3.  

Sample Input 2

3 3 4
2

Sample Output 2

22

E869120 can perform the operation twice. The sum of the integers eventually written on the blackboard is maximized as follows:  

First, double 4. The integers written on the board are now 3, 3, 8.  

Next, double 8. The integers written on the board are now 3, 3, 16.  

Then, the sum of the integers eventually written on the blackboard is 3 + 3 + 16 = 22.



Sample input:
5 3 11
1


Sample output:
30

Submission status: Wrong Answer

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

nums = sorted([A, B, C])
res = 0

for i in range(K):
    if nums[-1] + K < nums[-1] * 2:
        res += nums[-1] * 2
    else:
        res += nums[-1] + K
print(res + nums[0] + nums[1])

Submission status: Wrong Answer

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

nums = sorted([A, B, C])
res = 0

for i in range(K):
    if max(nums) + K < max(nums) * 2:
        res += max(nums) * 2
    else:
        res += max(nums) + K
print(res + A + B)

Submission status: Wrong Answer

Solution code:
abc = list(map(int,input().split()))
k=int(input())
sum_abc=sum(abc)+max(abc)*(2*k-1)
print(sum_abc)

Submission status: Wrong Answer

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

for i in range(k):
    max(num)*2
print(sum(num))

Submission status: Wrong Answer

Solution code:
from sys import stdin
A,B,C=[int(x) for x in stdin.readline().rstrip().split()]
K=int(stdin.readline().rstrip())
data=[A,B,C]
data=sorted(data)
data[-1]=data[-1]*2*K
print(sum(data))

Submission status: Wrong Answer

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

ans = max([A, B, C]) * (2 ** K)

print(ans)

Submission status: Wrong Answer

Solution code:
num_list = sorted(list(map(int, input().split())))
k = int(input())
num_max = num_list.pop()
num_max = 2*k*num_max
print(sum(num_list)+num_max)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
print(sum(sorted([a,b,c])[:2])+(max(a,b,c)*2*k if k>=1 else max(a,b,c)))

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
print(sum(sorted([a,b,c])[:2])+max(a,b,c)*2*k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = list(map(int,input().split()))
K = int(input())
print(sum(l)-max(l)+max(l)*2*K)

Submission status: Wrong Answer

Solution code:
l = list(map(int,input().split()))
K = int(input())
print(sum(l)+max(l)*(2*K-1))

Submission status: Wrong Answer

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

print(max(a,b,c)**(2*k)+a+b+c-max(a,b,c))

Submission status: Wrong Answer

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

idx = abc.index(max(abc))
abc[idx] *= 2*k
print(sum(abc))

Submission status: Wrong Answer

Solution code:
a,b,c = map(int, input().split())
k = int(input())
ans = a+b+c + max(a,b,c)*(2*k-1)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
N = sorted(list(map(int, input().split())))
K = int(input())
print(N[0] + N[1] + N[2] ** K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l=list(map(int,input().split()))
k=int(input())
m=max(l)
a=k*2*m
for i in range(len(l)):
    if l[i]==m:
        l[i]=a
        break
#print(l)
print(sum(l))

Submission status: Wrong Answer

Solution code:
l=list(map(int,input().split()))
k=int(input())
m=max(l)
a=k*2*m
for i in range(len(l)):
    if l[i]==m:
        l[i]=a
        break
print(sum(l))

Submission status: Wrong Answer

Solution code:
l=list(map(int,input().split()))
k=int(input())
m=max(l)
a=k*2*m
for i in range(len(l)):
    if l[i]==m:
        l[i]=a
print(sum(l))

Submission status: Wrong Answer

Solution code:
def main() -> None:
    A, B, C = map(int, input().split())
    K = int(input())
    m = [A, B, C]
    m.sort(reverse=True)
    ans = m[0] * 2 * K
    ans += sum(m[1:])
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main() -> None:
    A, B, C = map(int, input().split())
    K = int(input())
    m = [A, B, C]
    m.sort(reverse=True)
    ans = sum(m[:1] * 2) * K + sum(m[1:])
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
l = list(map(int, input().split()))
K = int(input())
print(sum(l)+(max(l))*2**(K-1))

Submission status: Wrong Answer

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
l = list(map(int, input().split()))
K = int(input())
print(sum(l)+(max(l))*(K-1))

Submission status: Wrong Answer

Solution code:
A = [int(i) for i in input().split()]
n = int(input())
print(max(A)*2**n)

Submission status: Wrong Answer

Solution code:
A = [int(i) for i in input().split()]
n = int(input())
print(max(A)**n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
e = [int(i) for i in input().split()]
k = int(input())

print(max(e) * 2 ** (k-1) + sum(e))

Submission status: Wrong Answer

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

print(max(list)*(2*k)+sum(list)-max(list))

Submission status: Wrong Answer

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

print(list[2]*(2*k)+list[0]+list[1])

Submission status: Wrong Answer

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

print(list[-1]*(2*k)+list[0]+list[1])

Submission status: Wrong Answer

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

print(max(list)*(2*k))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# B
a, b, c = map(int, input().split())
k = int(input())
print(a + b + c + max(a,b,c)*2*k - max(a,b,c))

Submission status: Wrong Answer

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

abcmax=max(a,b,c)
print(a+b+c+abcmax*2*k-abcmax)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
lst=sorted(list(map(int,input().split())))[::-1]
k=int(input())
plus=0
if not k==1:
    plus=lst[0]
print(sum(lst)+lst[0]**k-plus)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    abc = list(map(int, input().split()))
    K = int(input())
    m = max(abc)
    abc.remove(m)
    print(sum(abc) + m * K * 2)


main()

Submission status: Wrong Answer

Solution code:
x=[int(i) for i in input().split()]
x.sort()
print(x[2]*int(input())*2+x[0]+x[1])

Submission status: Wrong Answer

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

max_pos = numbers.index(max(numbers))
numbers[max_pos] *= 2
print(sum(numbers))

Submission status: Wrong Answer

Solution code:
"""AtCoder"""

abc = list(map(int, input().split()))
K = int(input())

abc.sort()

print(abc[0] + abc[1] + abc[2]*2*K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
k=int(input())
print(sum(a)-max(a)+max(a)*2*k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,C = list(map(int,input().split()))
K = int(input())
print(A+B+C+(2**K-1)*C)

Submission status: Wrong Answer

Solution code:
lis = list(map(int,input().split()))
K = int(input())
s=sum(lis)-max(lis)+max(lis)**K
print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
K = int(input())
m = max(A, B, C)
print(A + B + C + m * (2 * K - 1))

Submission status: Wrong Answer

Solution code:
l=[int(_) for _ in input().split()]
k=int(input())
print(max(l)*2*k+sum(l)-max(l))

Submission status: Wrong Answer

Solution code:
import sys
A,B,C = [int(n) for n in input().split()]
K = int(input())
ans = 0
yet = True
for s in [A,B,C]:
    if(s == max(A,B,C) and yet):
        ans+=s*K*2
        yet = False
    else:
        ans+=s

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
A,B,C = [int(n) for n in input().split()]
K = int(input())
ans = 0
for s in [A,B,C]:
    if(s == max(A,B,C)):
        ans+=s*K*2
    else:
        ans+=s

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, C = [int(x) for x in input().split()]
K = int(input())

i = 2 * K
a = A * i + B + C
b = A + B * i + C
c = A + B + C * i

print(max(a, b, c))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(a+b+c-max(a,b,c)+max(a,b,c)*(k**2))

Submission status: Wrong Answer

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

print(a+b+c-max(a,b,c)+max(a,b,c)*(k*2))

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
K=int(input())
M=max(max(A,B),C)
print(M**K+A+B+C-M)

Submission status: Wrong Answer

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

print(max(A, B, C)*2*K + A + B + C - max(A, B, C))

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
b = int(input())
a.sort()
c = a[::-1]
d = c[0]


for i in range(b):
    c[0] +=d
print(sum(c))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = [int(i) for i in input().split()]
k = int(input())
a.sort()
print(a[len(a)-1]**8+sum(a)-a[len(a)-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=[int(i) for i in input().split()]
b=int(input())
print(sum(a)-max(a)+max(a)*(b)*2)

Submission status: Wrong Answer

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

res = max(l) * (2*k) + sum(l) - max(l)
print(res)

Submission status: Wrong Answer

Solution code:
a,b,c = list(map(int, input().split()))
k = int(input())
m = max(a,b,c)
l = m
for i in range(k-1):
    l *= 2
print(sum([a,b,c])+l+m)

Submission status: Wrong Answer

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

for i in range(k):
    maxn*=2
    
if a>b & a>c:
    print(maxn+b+c)
elif b>a & b>c:
    print(maxn+a+c)
else:
    print(maxn+a+b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
L = sorted(list(map(int,input().split())))
k = int(input())
L[-1] = 2**k*L[-1]
print(sum(L))
print(L)

Submission status: Wrong Answer

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

print(2**k*max(a,b,c))

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
k,m = int(input()),max(a)
a.pop(a.index(max(a)))
print(m*(k*2)+min(a)+max(a))

Submission status: Wrong Answer

Solution code:
a = input().split()
a = [int(s) for s in a]
k = int(input())
maxi = int(max(a))
ans = 0 - maxi
maxi = maxi * k * 2
for i in a:
    ans = ans + int(i)
print(str(maxi+ans))

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
k=int(input())
print(sum(a)+max(a)*2*k-max(a))

Submission status: Wrong Answer

Solution code:
A,B,C= map(int,input().split())
K=int(input())
if A>=B and A>=C:
    print(A*2*K+B+C)
elif B>=A and B>=C:
    print(B*2*K+A+C)
elif C>=A and C>=B:
    print(C*2*K+B+A)

Submission status: Wrong Answer

Solution code:
A,B,C= map(int,input().split())
K=int(input())
if A>B and A>C:
    print(A*2*K+B+C)
elif B>A and B>C:
    print(B*2*K+A+C)
elif C>A and C>B:
    print(C*2*K+B+A)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
abc = map(int, input().split())
k = int(input())
print(max(abc) * (2 ** k - 1) + sum(abc))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, C = [int(x) for x in input().split()]
K = int(input())

def main():
    list = [A, B, C]
    list.sort(reverse=True)
    list[0] *= 2 * K
    print(sum(list))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
ABC = list(map(int,input().split()))
K = int(input())
ABC.sort
print(max(ABC) * (1 << K) + sum(ABC[0:-1]))

Submission status: Wrong Answer

Solution code:
l=list(map(int,input().split()))
k=int(input())
m=max(l)
l.pop(l.index(m))
print(sum(l)+m*2*k)

Submission status: Wrong Answer

Solution code:
l=list(map(int,input().split()))
k=int(input())
m=max(l)
l.pop(l.index(m))
print(sum(l)+m**k)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
k = int(input())
d = max(a)
print(d*2*k + sum(a) - d)

Submission status: Wrong Answer

Solution code:
A, B, C = [int(x) for x in input().split()]
K = int(input())

def main():
    list = [A, B, C]
    list.sort()
    list[2] *= 2 * K
    print(sum(list))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
#coding :utf-8
n=[int(i) for i in input().split()]
a=int(input())
n.sort()
n[0]=n[0]+n[1]+n[2]*2*a
print(n[0])

Submission status: Wrong Answer

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

def main():
    blackboard_list = list(map(int, input().split()))
    K = int(input())

    blackboard_list[blackboard_list.index(max(blackboard_list))] = max(blackboard_list) * 2 * K
    print(sum(blackboard_list))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

A = int(A)
B = int(B)
C = int(C)

X = (A, B, C)
M = max(X)
print(M ** K + A + B + C -M)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, c = [int(i) for i in input().split()]
k = int(input())

l = sorted([a, b, c])
print(l[-1] * k * 2 + l[0] + l[1])

Submission status: Wrong Answer

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

m = max(a,b,c)
al = a+b+c-m+m**k
print(al)

Submission status: Wrong Answer

Solution code:
x,y,z=[int(x) for x in str(input()).split()]
k=int(input())

a=max(x,y,z)
print(x+y+z+a+(k-1)*2*a)

Submission status: Wrong Answer

Solution code:
arr = map(int,raw_input().split())

ind = 0
for i in range(3):
	if arr[ind] < arr[i]:
		ind = i
k = int(input())

t = 0 
while t < k:
	arr[i] *= 2
	t+= 1

print sum(arr)

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
if max(a,b,c) == a:
  print(a*(2*k)+b+c)
elif max(a,b,c) == b:
  print(b*(2*k)+a+c)
else:
  print(a+b+c*(2*k))

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
if max(a,b,c) == a:
  print(a**(k+1)+b+c)
elif max(a,b,c) == b:
  print(b**(k+1)+a+c)
else:
  print(a+b+c**(k+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

l = [A, B, C]
l.sort()
print( l[2]*2*K + l[1] + l[0] )

Submission status: Wrong Answer

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

K = int(input())

numlist = [a,b,c]
numlist.sort()

print(numlist[2]*2*K + numlist[1] + numlist[0])

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split( ))
blackboard = [A, B, C]
K = int(input())
for i in range(K):
    Max = max(blackboard)
    for j in range(3):
        if blackboard[j] == Max:
            blackboard[j] = blackboard[j]*2
print(sum(blackboard))

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
k = int(input())
ans = a+b+c
m = 100
if m > a: 
    m = a
if m > b: 
    m = b
if m > c: 
    m = c
ans = ans - m
for i in range(k):
    m = m*2
print(ans + m)

Submission status: Wrong Answer

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

l.sort()
for i in range(K):
    l[0] = 2*l[0]
    
print(l[0] + l[1] + l[2])

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split( )))
y = int(input())
xx = sorted(x)
xx[2] == xx[2]*2**y
ans = sum(xx)
print(ans)

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split( )))
y = int(input())
M = max(x)
Max = M*2**y
print(Max)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
k = int(input())
m = max(a)
print(m**k + sum(a) - m)

Submission status: Wrong Answer

Solution code:
a,b,c=[int(i) for i in input().split()]
k=int(input())
li=[a,b,c]
mx=max(x for x in li)
for x in li:
  if x==mx:
    li.remove(x)
    break
print(2*k*mx+sum(li))

Submission status: Wrong Answer

Solution code:
a,b,c=[int(i) for i in input().split()]
k=int(input())
li=[a,b,c]
mx=max(x for x in li)
for x in li:
  if x==mx:
    li.remove(x)
print(2*k*mx+sum(li))

Submission status: Wrong Answer

Solution code:
li=[int(i) for i in input().split()]
k=int(input())
mx=max(x for x in li)
for x in li:
  if mx==x:
    li.remove(x)
    break
print(2*k*mx+sum(li))

Submission status: Wrong Answer

Solution code:
li=[int(i) for i in input().split()]
k=int(input())
mx=max(x for x in li)
for x in li:
  if mx==x:
    li.remove(x)
print(2*k*mx+sum(li))

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
K = int(input())
m = max(A, B, C)
print(A + B + C + 3 * m)

Submission status: Wrong Answer

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

abc = sorted(abc)
print(abc[0] + abc[1] + abc[2] * 2 * k)

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
D = max([A,B,C]) * 2 * K
ans = A + B + C + D - max([A,B,C])
print(ans)

Submission status: Wrong Answer

Solution code:
li = list(map(int, input().split()))
K = int(input())
mo = max(li)
print(sum(li) - mo + mo * 2 * K)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
K = int(input())
m = max(a)
a.remove(max(a))
print(sum(a)+m*2*K)

Submission status: Wrong Answer

Solution code:
A, B, C = list(map(int, input().split()))
K = int(input())
seisuu_list = [A, B, C]
seisuu_list.sort(reverse=True)
seisuu_list[0] *= 1024*seisuu_list[0]

sum = seisuu_list[0]+seisuu_list[1]+seisuu_list[2]
print(sum)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
k = int(input())
m = max(a)
print(m * 2 * k + sum(a) - m)

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
k = int(input())
y =max(x)
print(y*2*k + sum(x) - y)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
#if 0<k<11 and 0<a<=50 and 0<b<=50 and 0<c<=50: 
l=[a,b,c]
l.reverse()
l[0]=l[0]*(2**k)
#else:
#    print("No")
print(sum(l))

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
if 0<k<11 and 0<a<=50 and 0<b<=50 and 0<c<=50: 
    l=[a,b,c]
    l.reverse()
    for i in range(k):
        l[0]=l[0]*2
else:
    print("No")
print(sum(l))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
numList = map(int, raw_input().split())
k = int(raw_input())
maxN = max(numList)
maxIndex = numList.index(maxN)
ans = 0
for n in range(len(numList)):
    if n == maxIndex:
        ans += numList[n]**k
    else:
        ans += numList[n]
print ans

Submission status: Wrong Answer

Solution code:
numbers = list(map(int, input().split()))
k = int(input())
sum = 0
for i in range(3):
  if i == numbers.index(max(numbers)):
    sum += max(numbers) * 2 * k 
  else:
    sum += numbers[i]
print(sum)

Submission status: Wrong Answer

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

li.sort
print (li[0] + li[1] + li[2] * (2 ** K))

Submission status: Wrong Answer

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

li.sort
print (li[0] + li[1] + li[2] * (2 ** K))

Submission status: Wrong Answer

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

li.sort
print (li[0] + li[1] + li[2] ** K)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
s=0
if a<=b:
    if b<=c:
        s=c*2*k+a+b
    else:
        s=b*2*k+a+c

if b<=a:
    if a<=c:
        s=c*2*k+a+b
    else:
        s=a*2*k+b+c

if c<=a:
    if a<=b:
        s=b*2*k+a+c
    else:
        s=a*2*k+b+c
print(s)

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
k=int(input())
b=[0,0,0]
n=1

for i in range(0,2):
    if a[i]==max(a):
        a[i]=a[i]*(2**k)


print(sum(a))

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
k=int(input())
b=[0,0,0]
n=1

for i in range(0,len(a)):
    if a[i]==max(a):
        b[0]=a[i]
    else:
        b[n]=a[i]
        n+=1

ans=b[0]*(2**k)+b[1]+b[2]
print(ans)

Submission status: Wrong Answer

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

k = input()
k = int(k)

print(max(a * 2 * k + b + c, a + b * 2 * k + c, a + b + c * 2 * k))

Submission status: Wrong Answer

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

k = input()
k = int(k)

ans = 0

if max(a,b,c) == a:
  ans = ans + b + c
elif max(a, b, c) == b:
  ans = ans + a + c
elif max(a, b, c) == c:
  ans = ans + a + b

print(ans + max(a, b, c) * 2 * k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

max_num = max(abc) * (2 ** k)

print(max_num)

Submission status: Wrong Answer

Solution code:
def getinputdata():

    # 配列初期化
    array_result = []    
    data = input()
    array_result.append(data.split(" "))

    flg = True

    try:
        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

a = int(arr_data[0][0])
b = int(arr_data[0][1])
c = int(arr_data[0][2])
k = int(arr_data[1][0])
arr = sorted([a, b, c])

maxdata = sum(arr[0:len(arr)-1]) + arr[-1:][0] * k * 2

print(maxdata)

Submission status: Wrong Answer

Solution code:
l = sorted(map(int, input().split()))
k = int(input())
l[2] = l[2] * k ** 2
print(sum(l))

Submission status: Wrong Answer

Solution code:
*a,=map(int,input().split());m=max(a);print(sum(a)+m*2*int(input())-m)

Submission status: Wrong Answer

Solution code:
A=sorted(map(int,raw_input().split()));A[2]=A[2]*(2*input());print sum(A)

Submission status: Wrong Answer

Solution code:
from sys import stdin
a = map(int,stdin.readline().split())
k = int(stdin.readline())
b = max(a)
print b**k + sum(a) - b

Submission status: Wrong Answer

Solution code:
s = list(map(int, input().split()))
K = int(input())
s.reverse()
for i in range(K):
    s[0] *= 2
print(sum(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(max(map(int,input().split()))*int(input()))

Submission status: Wrong Answer

Solution code:
s = list(map(int, input().split()))
K = int(input())
s.reverse()
a = s[0]
for i in range(K):
    a *= 2
print(a+s[1]+s[2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(K):
    if s[0] >= s[1] and s[0] >= s[2]:
        s[0] *= 2
    elif s[1] >= s[0] and s[1] >= s[2]:
        s[1] *=1
    elif s[2] >= s[0] and s[2] >= s[1]:
        s[2] *= 2
print(s[0]+s[1]+s[2])

Submission status: Wrong Answer

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

for i in range(K):
    if s[0] > s[1] and s[0] > s[2]:
        s[0] *= 2
    elif s[1] > s[0] and s[1] > s[2]:
        s[1] *=1
    elif s[2] > s[0] and s[2] > s[1]:
        s[2] *= 2
print(s[0]+s[1]+s[2])

Submission status: Wrong Answer

Solution code:
numbers = list(map(int, input().split()))
K = int(input())
max_index = numbers.index(max(numbers))
result = 0
print('max: ', numbers[max_index])
result = [numbers[i] * 2 ** K if i == max_index else numbers[i] for i in range(len(numbers))]
print(sum(result))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat May  5 22:10:57 2018

@author: sakas
"""

a, b, c = map(int, input().split())
K = int(input())

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

Submission status: Wrong Answer

Solution code:
arr = list(map(int, input().split()))
k = int(input())
m = max(arr)
ans = m*(2**k)
if(m!=arr[0]):
	ans += arr[0]
if(m!=arr[1]):
	ans += arr[1]
if(m!=arr[2]):
	ans += arr[2]
print(ans)

Submission status: Wrong Answer

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

m = a
count = 0
if b>m:
    m=b
    count=1
if c>m:
    m=c
    count=2

if count==0:
    print(a**k+b+c)
if count==1:
    print(a+b**k+c)
if count==2:
    print(a+b+c**k)

Submission status: Wrong Answer

Solution code:
a,b,c = map(int, input().split())
mx = max(a,b,c)
other = a + b + c - mx

k = int(input())
mx = mx * 2 *  k

print (other + mx)

Submission status: Wrong Answer

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

testA = 0
if testA < a:
    testA = a
if testA < b:
    testA = b
if testA < c:
    testA = c
  
ans = a + b + c + testA * (K-1)
print(ans)

Submission status: Wrong Answer

Solution code:
A, B ,C = map(int, input().split())
K = int(input())
mx = max(A,B,C)
mt = A + B + C - mx
print(mx*2*K + mt)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,raw_input().split())   
k=int(raw_input())
ma=max(a,b,c)
n=2*ma*k
if a==ma:
 print b+c+n
elif b==ma:
 print a+c+n
else:
 print a+b+n

Submission status: Wrong Answer

Solution code:
A, B ,C = map(int, input().split())
K = int(input())
mt = A + B + C - max(A,B,C)
print(max(A,B,C)*2*K + mt)

Submission status: Wrong Answer

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

a.sort()
print('{}'.format(a[0] + a[1] + a[2] * 2 * K))

Submission status: Wrong Answer

Solution code:
A, B ,C = map(int, input().split())
K = int(input())
print(max(A,B,C)*2*K + A + B + C - max(A,B,C))

Submission status: Wrong Answer

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

# 入力を各変数に格納
num_list = [int(i) for i in input().split()]
times = int(input())

# 3つの数値を降順ソート
num_list.reverse()

num_tmp = num_list[0]
# 操作回数分の*2をする
for i in range(times):
	num_tmp = num_tmp * 2
num_list[0] = num_tmp

# リスト内の数値を合計して出力
print(sum(num_list))

Submission status: Wrong Answer

Solution code:
import numpy as np

nums = np.array(list(map(int, input().split())))
K = int(input())

nums = np.sort(nums)

nums[-1] *= 2 ** K
print(nums)

print(np.sum(nums))

Submission status: Wrong Answer

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

n_max = max(n)
n_max = n_max * (2 * k)

n[n.index(max(n))] = n_max

print(sum(n))