Skip to content

Commit

Permalink
Simple script to print all prime factors
Browse files Browse the repository at this point in the history
  • Loading branch information
marnovandermaas committed Aug 4, 2023
1 parent 29c3579 commit e009c43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sw/listing_all_prime_factors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
for n in range(1, 256):
print(str(n) + ": ", end="")
for k in range(2, n):
if n % k == 0:
print(str(k) + ", ", end="")
print("")

0 comments on commit e009c43

Please sign in to comment.