Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a, b, c, d, e = [int(i) for i in input().split()]
- f = input().split()
- if b >= e:
- print((a - 1) * c + e * d)
- print('NO')
- else:
- print((a - 1) * c + b * d)
- print(f[b])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement