流水线模型,用long long类型
’‘’ @File : 4043菜品制作.py @Time : 2021/04/13 04:47:34 @Author : SleepyPiggy @Version : 1.0 @Blog : sleepypiggy.life ‘’‘
n , k = map(int , input().split()) Ln = list(map(int,input().split())) d = max(Ln) a1 = sum(Ln) out = a1+(k-1)*d print(out)
流水线模型,用long long类型
!/usr/bin/env python
-- encoding: utf-8 --
’‘’
@File : 4043菜品制作.py
@Time : 2021/04/13 04:47:34
@Author : SleepyPiggy
@Version : 1.0
@Blog : sleepypiggy.life
‘’‘
here put the import lib
n , k = map(int , input().split())
Ln = list(map(int,input().split()))
d = max(Ln)
a1 = sum(Ln)
out = a1+(k-1)*d
print(out)