fork(4) download
  1.  
  2. f(n){char d[11],i=0,r;for(;i++^10;d[i-1]=d[r=rand()%i],d[r]=47+i);*d^48?d[n]=0,puts(d):f(n);}
  3.  
  4. int main(void)
  5. {
  6. srand( time( 0 ) );
  7.  
  8. for( int i = 1 ; i < 10 ; i++ )
  9. {
  10. f( i );
  11. }
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
8
37
194
8451
58643
368209
9406281
63709542
235094768