All possible values of floor ( N / K ) for all values of K | Function to print all possible values of floor ( N / K ) ; Iterate from 1 to N + 1 ; Driver code
def allQuotients ( N ) : NEW_LINE INDENT s = set ( ) NEW_LINE for k in range ( 1 , N + 2 ) : NEW_LINE INDENT s . add ( N // k ) NEW_LINE DEDENT for it in s : NEW_LINE INDENT print ( it , end = ' ▁ ' ) NEW_LINE DEDENT DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT N = 5 NEW_LINE allQuotients ( N ) NEW_LINE DEDENT