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:
def answer(a: int, b: int, c: int, k: int) -> int:
    nums = sorted((a, b, c))
    nums[-1] = nums[-1] * 2 * k

    return sum(nums)


def main():
    a, b, c = map(int, input().split())
    k = int(input())
    print(answer(a, b, c, k))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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 + 2**(K-1) * m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(max(ABC)*(K-1) + sum(ABC))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
for i in range(int(input())):
    x.sort
    x[-1]=x[-1]*2
print(sum(x))

Submission status: Wrong Answer

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

a,b,c= sorted([a,b,c])
print(a+b+c*n)

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
K = int(input())
max_num = max(nums)
ans = 0
for num in nums:
    if max_num == num:
        ans += num * (2 ** K)
    else:
        ans += num
print(ans)

Submission status: Wrong Answer

Solution code:
ABC = sorted(map(int, input().split()))
K = int(input())

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

Submission status: Wrong Answer

Solution code:
ABC = sorted(map(int, input().split()))
K = int(input())

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

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+2*k*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+2*k*d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
l=[]
l.append((k+1)*a +b+c)
l.append((k+1)*b +a+c)
l.append((k+1)*c +a+b)
print(max(l))

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
l=[]
l.append((k+1)*a +b+c)
l.append((k+1)*b +a+c)
l.append((k+1)*c +a+b)
print(l)

Submission status: Wrong Answer

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

abc.sort()
abc[2] = abc[2] * 2 ** (k-1)

print(sum(abc))

Submission status: Wrong Answer

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

abc.sort()
abc[2] = abc[2] * 2 * k

print(sum(abc))

Submission status: Wrong Answer

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

a1 = max(a,b,c)
b1 = min(a,b,c)
c1 = (a + b + c) - (a1 + b1)

multipled_num = 2 * k * a1

print(multipled_num + b1 + c1)

Submission status: Wrong Answer

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

tmp_lists = []
for i in range(3):
    ans_lists = num_list.copy()
    ans_lists[i] = num_list[i]*(2**k)
    tmp_lists.append(ans_lists)

max = 0

for list in tmp_lists:
    sum = 0
    for k in list:
        sum += k
    if max < sum:
        max = sum

print(sum)

Submission status: Wrong Answer

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

tmp_lists = []
for i in range(3):
    ans_lists = num_list.copy()
    ans_lists[i] = num_list[i]*(k*2)
    tmp_lists.append(ans_lists)

max = 0

for list in tmp_lists:
    sum = 0
    for k in list:
        sum += k
    if max < sum:
        max = sum

print(sum)

Submission status: Wrong Answer

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

max = 0
index = 0
for i in num_list:
    if max < i:
        max = i
        index = num_list.index(i)

maximize = max * (2*k)
num_list[index] = maximize
sum = 0
for j in num_list:
    sum += j

print(sum)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

abc.sort

for i in range (k):
    abc[-1] *= 2

print(sum(abc))

Submission status: Wrong Answer

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

res = max([a, b, c]) * (2 * k - 1) + a + b + c
print(res)

Submission status: Wrong Answer

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

res = max([a, b, c]) * (2 * k) + a + b + c - max([a, b, c])
print(res)

Submission status: Wrong Answer

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

m = max(a,b,c)

for i in range(k):
    m *= 2

ans = a+b+m

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
data = list(map(int, input().split()))
k = int(input())
if k == 1:
    print( sum(data) + max(data) )
else:
    tmp = max(data)
    for _ in range(k):
        tmp = tmp ** 2
    print( sum(data) + tmp - max(data) )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,C =map(int,input().split())
K = int(input())
l = [A,B,C]
sl = sorted(l)
#print(sl)

for i in range(K):
    if sl[-1] <= 25:
        sl[-1] *= 2
    elif sl[-2] <= 25:
        sl[-2] *= 2
    elif sl[-3] <= 25:
        sl[-3] *= 2
    else:
        pass
#print(sl)
print(sum(sl))

Submission status: Wrong Answer

Solution code:
A,B,C =map(int,input().split())
K = int(input())
l = [A,B,C]
sl = sorted(l)
#print(sl)

for i in range(K):
    if sl[-1] < 25:
        sl[-1] *= 2
    elif sl[-2] < 25:
        sl[-2] *= 2
    elif sl[-3] < 25:
        sl[-3] *= 2
    else:
        pass
#print(sl)
print(sum(sl))

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
note = max(a,b,c)
for i in range(k):
	note *= 2
print(note)

Submission status: Wrong Answer

Solution code:
MM = input().split()
A = int(MM[0])
B = int(MM[1])
C = int(MM[2])
K = int(input())
S = [A,B,C]
S.sort()
S[-1] = S[-1] * 2 *K
total =0
for i in S:
  total += i
print(total)

Submission status: Wrong Answer

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

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:
def main():
    a = list(map(int, input().split()))
    k = int(input())
    a.sort()
    print(a[0]+a[1]+a[2]*2*k)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

K = int(input())

num = 0
ans = A+B+C
while True:
    num += 1
    ans += max(A,B,C)*(num)
    if num == K:
        break

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
array_abc = list(map(int,input().split()))
K = int(input())

if not ( 1 <= min(array_abc),max(array_abc) <= 50 ):
    sys.exit()
if not ( 1 <= K <= 10 ):
    sys.exit()

option = max(array_abc)
for I in range(1,K):
    option += option * 2
print(sum(array_abc) + option)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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+m**k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def actual(a, b, c, k):
    def operation(nums):
        values = []

        for num in nums:
            if num == max(nums):
                values.append(2 * num)
            else:
                values.append(num)

        return values

    nums = [a, b, c]

    for _ in range(k):
        nums = operation(nums)

    return sum(nums)


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

print(actual(a, b, c, k))

Submission status: Wrong Answer

Solution code:
A, B, C = sorted(map(int, input().split()))
K = int(input())
#黒板に書かれている整数のうち 1 つを選び, これを 2 倍した値に書き換える. 
print(A + B + C*2*K)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

A,B,C = I()
K = i()
m = max(A,B,C)
ans = A+B+C+m*(2*K-1)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

A,B,C = I()
K = i()
m = max(A,B,C)
ans = A+B+C
for i in range(K):
    ans += m*(i+1)
print(ans)

Submission status: Wrong Answer

Solution code:
A=list(map(int,input().split()))
K=int(input())
A.sort(reverse=True)
ans=sum(A)
ans-=A[0]
for i in range(K):
  ans+=A[0]
  A[0]*=2
print(ans)

Submission status: Wrong Answer

Solution code:
A=list(map(int,input().split()))
K=int(input())
A.sort(reverse=True)
ans=sum(A)
for i in range(K):
  ans+=A[0]
print(ans)

Submission status: Wrong Answer

Solution code:
A = list(map(int,input().split()))
K = int(input())
N = sorted(A)[-1]
print(sorted(A)[0] + sorted(A)[1] +N*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*2*k+b+c)
elif max(a,b,c)==b: print(b*2*k+a+c)
else: print(c*2*k+b+a)

Submission status: Wrong Answer

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

lst = sorted(n, reverse=True)
lst2 = lst[0]*2*k+sum(lst[1::])
print(lst2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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:
nums = list(map(int,input().split()))
k = int(input())
print(sum(nums) - max(nums) + max(nums)*2*k)

Submission status: Wrong Answer

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

tmp = max(a)
m = 0
for i in range(k):
  m = 2*max(a) + m

for i in range(3):
  if a[i] == tmp:
    a[i] = m
    break
  
print(sum(a))

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:
def resolve():
    a = list(map(int, input().split()))
    K = int(input())
    print(sum(a)-max(a)+max(a)*2*K)
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    A, B, C = map(int, input().split())
    K = int(input())
    for i in range(K):
        C *= 2
    print(A+B+C)
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = max(xs)
ans = x * (2*k) + sum(xs) - x

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

sorted(ds)
print(sum(ds[:-1]) + ds[-1]*(2**k))

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
k =int(input())
m = 0
if b <= a and c <= a:
    for n in range(1, k + 1):
        if n == 1:
            i = a * 2
            m = i
        else:
            m = i * 2
    g = m + b + c
    print(g)
elif a <= b and c <= b:
    for n in range(1, k + 1):
        if n == 1:
            i = b * 2
            m = i
        else:
            m = i * 2
    g = m + a + c
    print(g)
else:
    for n in range(1, k + 1):
        if n == 1:
            i = c * 2
            m = i
        else:
            m = i * 2
    g = m + a + b
    print(g)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    a, b, c = mi()
    k = ii()
    print(a + b + c + (pow(2, k) - 1) * c)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
d = max(a, b, c)
e = a + b + c
k = int(input())
for i in range(k):
    e += d * (i + 1)
print(e)

Submission status: Wrong Answer

Solution code:
a = [int(i) for i in input().split()]
K=int(input())
a.sort()
ans = 0
for i in range(K):
  a[-1] = a[-1]**2
print(sum(a))

Submission status: Wrong Answer

Solution code:
a = [int(i) for i in input().split()]
K=int(input())
ans = 0
for i in range(K):
  a[-1] = a[-1]**2
print(sum(a))

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
K = int(input())
m = max(A, B, C)
for i in range(K):
  m *= m
print(A+B+C+m-max(A, B, C))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A.sort(reverse = True)
#print(A)
#print(A[0])

x1 =0

for i in range(K):
    x = A[0] * 2
    x1 = x1 + x
#print(x1)
print(x1 +A[1] +A[2])

Submission status: Wrong Answer

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

kazu=[a,b,c]
kazu.sort()
#print(kazu)
print(a+b+kazu[2]*2**k)

Submission status: Wrong Answer

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

kazu=[a,b,c]
kazu.sort()
#print(kazu)
print(a+b+kazu[2]*2*k)

Submission status: Wrong Answer

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

kazu=[a,b,c]
kazu.sort()
#print(kazu)
print(a+b+c*2*k)

Submission status: Wrong Answer

Solution code:
def resolve():
	nums = list(map(int, input().split()))
	k = int(input())
	ans = 0
	v = max(nums)
	for i in nums:
		if i == v:
			continue
		ans += i
	print(ans + v*2*k)
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(max(N) * (2*K) + sum(N) - max(N))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

m = max(a, b, c)
print(sum([a, b, c])-m+(m*2)**k)

Submission status: Wrong Answer

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

m = max(a, b, c)
print(sum([a, b, c])-m+m*2*k)

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
a=sorted(a)
k=int(input())
g=2
for i in range(1,k+1):
       f=a[2]*g
       a[2]=f
       g=g+2
c=a[0]+a[1]+a[2]
print(c)

Submission status: Wrong Answer

Solution code:
# ABC096B

def f(a, b, c, k):
    abc = sorted([a, b, c])
    if k != 0:
        abc[2] *= 2 * k
    print(sum(abc))

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

Submission status: Wrong Answer

Solution code:
def f(a, b, c, k):
    abc = sorted([a, b, c])
    abc[2] *= 2 * k
    print(sum(abc))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d = max(a,b,c)

print(d*2*k+a+b+c-d)

Submission status: Wrong Answer

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

n = max(a, b)
n = max(n, c)

ans = a+b+c+n*(2*k-1)

print(ans)

Submission status: Wrong Answer

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

max_suffix = 0
for i in range(1,3):
    if l[max_suffix] < l[i]:
        max_suffix = i
        
ans = 0
for i in range(3):
    if i == max_suffix:
        ans += l[i] * 2 * k
    else:
        ans += l[i]
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

a = list(map(int,input().split()))
k = int(input())
a[-1] = a[-1] * (2**k)

print(sum(a))

Submission status: Wrong Answer

Solution code:
A,B,C,K=map(int,open(0).read().split());print(A+B+C*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:
a,b,c=map(int, input().split())
k=int(input())
s=max(a,b,c)
for i in range(k-1):
  s*=2
print(a+b+c+s)

Submission status: Wrong Answer

Solution code:
def main():
    A, B, C = map(int, input().split())
    K = int(input())
    for i in range(K):
        if A > B and A > C:
            A = 2*A
        if B > A and B > C:
            B = 2*B
        if C > A and C > B:
            C = 2*C
    print(sum([A, B, C]))
main()

Submission status: Wrong Answer

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

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:
doubles = list(map(int, input().split()))
k = int(input())
max_n = doubles.pop(doubles.index(max(doubles))) * (2*k)
print(max_n + sum(doubles))

Submission status: Wrong Answer

Solution code:
''' Versao V judge'''
line = input()
num_a, num_b, num_c = [int(n) for n in line.split()]
num_k = [int(n) for n in line.split()][0]
numbers = [num_a, num_b, num_c]
numbers.sort(reverse=True)
numbers[0] *= 2**num_k
print(sum(numbers))

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
d = int(input())
l = [a, b, c]
index = l.index(max(l))
l[index] = l[index] * 2 * d
print(sum(l))

Submission status: Wrong Answer

Solution code:
def main():
    line = input()
    lista = [int(n) for n in line.split()]
    k = int(input())
    index = lista.index(max(lista))
    lista[index] *= 2*k
    soma = 0
    for i in range(len(lista)):
        soma += lista[i]
    print(soma)
main()

Submission status: Wrong Answer

Solution code:
def main():
    line = input()
    lista = []
    lista.append(int(line.split()[0]))
    lista.append(int(line.split()[1]))
    lista.append(int(line.split()[2]))
    k = int(input())
    index = lista.index(max(lista))
    lista[index] *= 2*k
    soma = 0
    for i in range(len(lista)):
        soma += lista[i]
    print(soma)
main()

Submission status: Wrong Answer

Solution code:
numeros = [int(x) for x in input().split()]
k = int(input())
index_maior = 0
maior = numeros[0]
for index, value in enumerate(numeros):
    if value > maior:
        maior = value
        index_maior = index
numeros[index_maior] = numeros[index_maior] * 2 * k
print(sum(numeros))

Submission status: Wrong Answer

Solution code:
numeros = [int(x) for x in input().split()]
k = int(input())
index_maior = 0
maior = 0
for index, value in enumerate(numeros):
    if value > maior:
        maior = value
        index_maior = index
numeros[index_maior] = numeros[index_maior] * 2 * k
print(sum(numeros))

Submission status: Wrong Answer

Solution code:
line = input()

a, b, c = [int(n) for n in line.split()]
k = int(input())

max_val = max(a, b, c)
max_val_mem = max_val

amax = False
bmax = False
cmax = False

for _ in range(k):
    max_val *= 2

if max_val_mem == a:
    amax = True
    print(str(max_val+ b+ c))
if max_val_mem == b:
    bmax = True
    print(str(max_val+ a+ c))
if max_val_mem == c:
    cmax = True
    print(str(max_val+ a+ b))

Submission status: Wrong Answer

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

print(a + b + c * K)

Submission status: Wrong Answer

Solution code:
arr  = list(map(int,input().split()))
k = int(input())
arr.sort()
arr[2] = arr[2]*2*k
print(sum(arr))

Submission status: Wrong Answer

Solution code:
# abc096_b.py
A = list(map(int,input().split()))
A.sort(reverse=True)
N = int(input())
ans = 0
for i,v in enumerate(A):
    if i == 0:
        ans += v*2*N
    else:
        ans += v
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    A.sort()
    print(sum(A[:-1])+A[-1]*2*k)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

a.sort(reverse=True)
a[0] = a[0]*2*k

print(sum(a))

Submission status: Wrong Answer

Solution code:
num=list(map(int,input().split()))
k=int(input())
ans1=sum(num)-max(num)
ans2=0

for i in range(k):
  ans2+=max(num)*2

  
print(ans1+ans2)

Submission status: Wrong Answer

Solution code:
num=list(map(int,input().split()))
k=int(input())
ans1=sum(num)-max(num)
ans2=0

while k>0:
  ans2+=max(num)*2
  k-=1
  
print(ans1+ans2)

Submission status: Wrong Answer

Solution code:
li=list(map(int,input().split()))
a=li.pop(-1)
k=int(input())
a=a*(2**k)
for i in li:
  a+=i
print(a)