Subfactorial FIXED by *yuko*

var a,b:array[byte]of comp;i,j,k:comp;begin a[1]:=1;repeat
i:=i+1;j:=99;while 1div j+a[j]=0do j:=j-1;for j:=-j to-1do
write(a[-j]);writeln;k:=0;for j:=1to 99do begin k:=(a[j]+b[j])*i+k
div 10;a[j]:=b[j];b[j]:=k mod 10end until i>50end.

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

download

return to the top page