Polynomial Sequences by Purika

N[11],i,n;main(s,a,p){while(gets(p=a)){for(;s=N[i]=strtol(p,&p,0),s+!i;n=++i);for(;n;)i<n?N[i++]=N[i+1]-N[i]:(i=0,s+=N[--n]);printf("%d\n",s);}}

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

download

return to the top page