Alex Larose

Generation

code to explanationThu, 18 May 2023

First line of the input will contain two space separated integers N and K. Next and last line of the input contains N space separated integers Output Print the answer to the given test case in a separate line.

Constraints 1 <= N <= 10^7 0 <= K <= 10^10 0 <= Ai <= 10^9

Questions about programming?Chat with your personal AI assistant