You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
""" Given N positive integers, find the minimum sum S that can be obtained by adding exactly M out of the N integers. The program must print the value of the minimum sum S in Python.
Example 1:
Input:
5 2
9 2 1 5 4
Output:
3
Explanation :
Out of the five given numbers, the sum of 1+2=3 is the least sum and hence printed as the output """