fork download
  1. import java.io.BufferedReader;
  2. import java.io.InputStreamReader;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
  9. String[] params1 = bufferedReader.readLine().split(" ");
  10. long numb, divisor = 2;
  11. numb = Integer.parseInt(params1[0]);
  12. while (divisor*divisor <= numb)
  13. {
  14. if (numb%divisor == 0)
  15. {
  16. System.out.print(divisor);
  17. numb = numb / divisor;
  18. System.out.print('*');
  19. }
  20. else if (divisor == 2) divisor = 3;
  21. else divisor = divisor + 2;
  22. }
  23. System.out.print(numb);
  24. }
  25. }
Success #stdin #stdout 0.04s 2184192KB
stdin
12313
stdout
7*1759