4 ms·
Write a C program that outputs a large number: A contest from 2001 [video]
From the contest announcement:
The object of the BIGNUM BAKEOFF is to write a C program of 512 characters or less (excluding whitespace) that returns as large a number as possible from main(), assuming C to have integral types that can hold arbitrarily large integers.
I was quite fascinated by the entries and so I made a video series about the contest, you can find it here.
https://www.youtube.com/playlist?list=PL-R4p-BRL8NR8THgjx_DW9c92VHTtjZEY
It starts off with some elementary yet powerful ideas, continues to a surprisingly fast growing function, then it reaches past the limits of math and finally pulls back a bit for the winning entry. (This will make sense once you've watched the videos.)
The content of the videos are mostly from the organizers comments on the entries, along with some additional Wikipedia research. You can find the organizer's comments here: http://djm.cc/dmoews.html
(As long as I'm advertising this, you might also want to check out a fun hat puzzle on the same channel.)
- zgs 6y agoSeriously, a waste of time_t: #include <time.h> #include <stdio.h> int main(int argc, char *argv[]) { while (time(NULL) > 0) putchar('9'); putchar('\n'); return 0; }
- finedesign 6y agoSystem Requirements: - A time machine so that we can go back to before 1970 and get the program to stop and output a number. - An insanely fast computer so that by the time you use your time machine enough 9s have been printed.
- Someone 6y agoThat’s beaten very easily by int main(int argc, char *argv[]) { return 1; } and that still is a very bad entry for this contest. (Always carefully read the rules) Seriously, I haven’t watched the video, but chances are it has solutions that are in a completely different league than the idea behind your proposal. It likely goes into similar territory as “Who Can Name the Bigger Number?” (https://www.scottaaronson.com/writings/bignumbers.html https://www.scottaaronson.com/writings/bignumbers.html)