fork download
  1. #include <stdio.h>
  2.  
  3. void b(int n){
  4. static int a=2;
  5.  
  6. if(n%a==0){
  7. printf("%d ",a);
  8. b(n/a);
  9. }
  10. else if(n==1){
  11. printf("\n");
  12. }
  13. else{
  14. a++;
  15. b(n);
  16. }
  17. }
  18.  
  19. int main(){
  20.  
  21. b(2100);
  22.  
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0.01s 5284KB
stdin
7
stdout
2 2 3 5 5 7