1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| #! /usr/bin/env python
| import sys
| n = int(sys.argv[1])
|
| # quote_test ist ein 2-er Tupel (q, r)
| while (quote_rest := divmod(n, 2)) and quote_rest[1] == 0:
| print(f"{2} ", end="")
| n = quote_rest[0]
|
| p = 3
| while p * p <= n:
| if (quote_rest := divmod(n, p)) and quote_rest[1] == 0:
| print(f"{p} ", end="")
| n = quote_rest[0]
| else:
| p += 2
| if n != 1:
| print(n)
|
| #print(f"iteration: {__iteration}")
|
|