If number has exactly K factors puch in result [ ]
if ( count == k ) : NEW_LINE INDENT result . append ( i ) NEW_LINE DEDENT p = len ( result ) NEW_LINE for index in range ( p - 1 ) : NEW_LINE element = result [ index ] NEW_LINE count = 1 NEW_LINE z = index NEW_LINE