Maximize count of equal numbers in Array of numbers upto N by replacing pairs with their sum | Function to count maximum number of array elements equal ; Driver Code ; Function call
def countEqual ( n ) : NEW_LINE INDENT return ( n + 1 ) // 2 NEW_LINE DEDENT lst = [ 1 , 2 , 3 , 4 , 5 , 6 ] NEW_LINE n = len ( lst ) NEW_LINE print ( countEqual ( n ) ) NEW_LINE