Skip to content

Instantly share code, notes, and snippets.

@altmind
Created April 6, 2012 16:01
Show Gist options
  • Select an option

  • Save altmind/2321007 to your computer and use it in GitHub Desktop.

Select an option

Save altmind/2321007 to your computer and use it in GitHub Desktop.
int main(void){
int a[3302],b=3301,*c=a,d,e,f;
for(e=b; --e; *c++=1)
;
*c=2;
for(d=2001; d--; printf("%05d",f)) {
for(c=a, e=b; e; f/=e--){
f += *c * 1e5;
*c++ = f%e;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment