python 练习 20

#!/usr/bin/python
# -*- coding: UTF-8 -*-

from sys import stdout
n = int(raw_input("input number:\n"))
print "n = %d" % n

for i in range(2,n + 1):
    while n != i:
        if n % i == 0:
            stdout.write(str(i))
            stdout.write("*")
            n = n / i
        else:
            break
print "%d" % n

 

posted @ 2016-05-26 17:04  七月的尾巴_葵花  阅读(179)  评论(0编辑  收藏  举报