$n=pop;for(;;){warn$f,map(int rand 10,1..$n),$/;++$i%1e3 or$f.=int rand 10 and$n--or last} #### @x=("%d")x($n=pop);$"="";for(;;){printf"@x\n",map(int rand 10,1..$n);++$i%500 or$n-=$x[rand@x]=~s/../int rand 10/e or last;}