Sha256: 3f773a403f19d61e43c58337b4e3572e14156d3398210eedd519d7cfb19b5d6a
Contents?: true
Size: 227 Bytes
Versions: 396
Compression:
Stored size: 227 Bytes
Contents
def prime_factors(number): factors = [] divisor = 2 while number > 1: while number % divisor == 0: factors.append(divisor) number /= divisor divisor += 1 return factors
Version data entries
396 entries across 396 versions & 1 rubygems