def challenge(y): [y/x for x in sorted(set(sum(((n, y/n) for n in range(1, int(y**0.5)+1) if not y % n), ())))[::-1] if ((5*x*x-4)**0.5 % 1 == 0) or ((5*x*x+4)**0.5 % 1 == 0)] print "\n".join(str(challenge(n)) for n in (21, 84, 0, 578, 12345679))
Standard input is empty
None None None None None
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!