x=int(input('podaj liczbę\n'))p=2while x>2: while x%p==0: x=x/p print(p) p=p+1
18
podaj liczbę 2 3 3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!