Segregate remainders of even and odd numbers in respective sets
for i in range ( N ) : NEW_LINE INDENT num = A [ i ] NEW_LINE if ( num % 2 == 0 ) : NEW_LINE INDENT even [ num % K ] = 1 NEW_LINE DEDENT else : NEW_LINE INDENT odd [ num % K ] = 1 NEW_LINE DEDENT DEDENT