This function prints the optimal number of elements and respective cumulative value which is less than the given number
def findNoOfElementsandValue ( arr : list , N : int , B : int ) : NEW_LINE INDENT global value NEW_LINE DEDENT