⌨️

[AtCoder]ABC-096|B - Maximum Sum

2023/01/18に公開

設問ページ

提出結果

def getIntList():
    return list(map(int, input().split()))


def getInt():
    return int(input())


def main():
    n = getIntList()
    k = getInt()

    n.sort()
    n.reverse()

    for i in range(k):
        n[0] = n[0] * 2

    print(sum(n))


if __name__ == "__main__":
    main()

Discussion