r3da / misc

1 stars 1 forks source link

List number dividers #7

Open r3da opened 10 years ago

r3da commented 10 years ago

Given an integer n, return a list of pairs (p,q) where n = p * q and p <= q

example: n = 12 Output: (2,6), (3,4)

axeliux commented 10 years ago

What about n < 1 ??

r3da commented 10 years ago

n should be > 1. if n < 0, it will have the same factors as -n