Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

One Line Factorial

Name: Anonymous 2009-06-15 15:56

for(int a1=1,a2=1,i=scanf_s("%d",&i)+i-1;(i--)>2; a1=(a2+=a1)-a1,(i==2)?printf_s("Result=%d\n",a2):NULL)

Name: Anonymous 2009-06-17 8:49

>>20
lol @ inefficient algorithm
see >>7,10 for better ones.
especially the prime-swing one in >>7. implement that (with a better prime sieve) in assembly and unless you do something incredibly stupid it should be faster than GMP's factorial function.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List