Untitled

mail@pastecode.io avatar
unknown
python
7 months ago
261 B
0
Indexable
Never
n = (int)(input())

p = 2

a = []

while n != 1:
    if n % p == 0:
        n  /= p
        a.append(p)
    else:
        p += 1
        
for i in range(len(a)):
    if i != len(a)-1:
        print(f"{a[i]} * ", end = "")
    else:
        print(a[i], end = "")
Leave a Comment