摘要: 因子分解Description 找出输入整数的所有因子(包括重复因子),并按从小到大的顺序依次输出。Input 输入一组待分解整数,每个整数k占一行。 保证所有的输入数字1 <= k < 2^21Output 输出每个输入整数的所有因子(按因子从小到大的顺序输出),因子之间用空格隔开。Sample Input 4 7 12Sample Output 2 2 7 2 2 3Code: #include<iostream> #include<stdio.h> usingnamespacestd; intmain() { inti,j,n; wh... 阅读全文
posted @ 2009-07-07 21:27 xwdreamer 阅读(207) 评论(0) 推荐(0) 编辑