Pete-7.c

pete-7.c is the largest of the nine entries an anonymous "Pete" submitted to Bignum Bakeoff. It placed third in the competition, behind marxen.c and loader.c.

Code

 * 1) define F (9<<(9<<(9<<(9<<
 * 2) define D F F F F
 * 3) define E ))))))))))))))))


 * 1) define N D D 99 E E

int B = N;

f(int *a) {      int C = B, b[N], n = N;    while(n--) b[n] = a[n]; n = N - 1; if(b[n]--) while(C--) B = f(b); while(n-- && !(b[n + 1] = B, b[n]--)) ;      return n == -1 ? B * B : f(b); }

main {   int a[N] = {N};

return f(a); }