Factorial by tails

for((c=10;j<${#a[@]}|c>9||!(j=i++>99);)){
s[i]=$[a[j++]=(c=a[j]*i+c/10)%10]${s[i]}
}
read n&&echo ${s[n]}&&. *

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

download

return to the top page