import std.stdio;void main(){for(int n,k,c,m;~scanf("%d",&n);puts=""){int[200]a;for(*a=m=1;n;m=k,n--)for(k=0;c||k<m;a[k++]%=10)c=(a[k]=a[k]*n+c)/10;for(;m--;)writef=a[m];}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).