two kinds of digit by smkt (No itoa()??)

main(){int i,y,c,toc,f;char a[9];for(i=0;i<10001;i++){\x0d
toc=0;sprintf(a,"%d",i);for(c=48;c<58;c++){\x0d
f=0;for(y=0;a[y];y++)if(a[y]==c)f=1;f?toc++:0;\x0d
}toc^2?0:printf("%d\n",i);}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page