#!/usr/bin/python# -*- coding: UTF-8 -*-from sys import stdoutn = int(raw_input("input number:\n"))print "n = %d" % nfor i in range(2,n + 1): while n != i: if n % i == 0: stdout.write(str(i)) stdout.write("*") n = n / i else: breakprint "%d" % n
本文共 356 字,大约阅读时间需要 1 分钟。
#!/usr/bin/python# -*- coding: UTF-8 -*-from sys import stdoutn = int(raw_input("input number:\n"))print "n = %d" % nfor i in range(2,n + 1): while n != i: if n % i == 0: stdout.write(str(i)) stdout.write("*") n = n / i else: breakprint "%d" % n
转载于:https://www.cnblogs.com/kuihua/p/5531817.html