import java.util.Scanner; public class Main { /** * @param args */ public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); for (int j = 1; j <=n; j++) { if (n%j==0) { for (int k = 2; k <=j; k++) { if (j==2) { System.out.print(j+" "); }else { if(j%k==0){ break; }else { System.out.print(j+" "); } } } } } } }
解题思路: 找规律 自己写
QQ号 1422682170 欢迎讨论
注意事项:
参考代码:
0.0分
0 人评分