import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(sc.hasNext()){ int n=sc.nextInt(); int count=0; for (int i = 2; i <=Math.sqrt(n); i++) { while(n%i==0){ n=n/i; if(count==0){ System.out.print(i); count++; }else System.out.print("*"+i); } } if(n>1){ if(count==0) System.out.println(n); else System.out.println("*"+n); }else System.out.println(); } } }
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题4.9 (C语言代码)浏览:691 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:530 |
矩阵加法 (C语言代码)浏览:1723 |
简单的a+b (C语言代码)浏览:488 |
有关字符,字符串的输入输出函数说明浏览:479 |
DNA (C语言代码)浏览:395 |
GC的苦恼 (C语言代码)浏览:621 |
分糖果 (C语言代码)浏览:920 |
交换Easy (C语言代码)浏览:763 |
多输入输出练习2 (C语言代码)浏览:1657 |