Count of Binary Strings possible as per given conditions | Function to generate maximum possible strings that can be generated ; Maximum possible strings ; Driver code
def countStrings ( A , B , K ) : NEW_LINE INDENT X = ( A + B ) // ( K + 1 ) NEW_LINE return ( min ( A , min ( B , X ) ) * ( K + 1 ) ) NEW_LINE DEDENT N , M , K = 101 , 231 , 15 NEW_LINE print ( countStrings ( N , M , K ) ) NEW_LINE