Skip to content

Instantly share code, notes, and snippets.

@sirpengi
Last active August 29, 2015 13:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sirpengi/9478864 to your computer and use it in GitHub Desktop.
Save sirpengi/9478864 to your computer and use it in GitHub Desktop.
proggitquiz
"If the integers from 1 to 999,999,999 are written as
words, sorted alphabetically, and concatenated, what
is the 51 billionth letter?"
To be precise: if the integers from 1 to 999,999,999
are expressed in words (omitting spaces, 'and', and
punctuation[1]), and sorted alphabetically so that
the first six integers are
eight
eighteen
eighteenmillion
eighteenmillioneight
eighteenmillioneighteen
eighteenmillioneighteenthousand
twothousandtwohundredtwo
then reading top to bottom, left to right, the 28th
letter completes the spelling of the integer "eighteenmillion".
The 51 billionth letter also completes the spelling
of an integer. Which one, and what is the sum of all
the integers to that point?
[1] For example, 911,610,034 is written "ninehundredelevenmillionsixhundredtenthousandthirtyfour";
500,000,000 is written "fivehundredmillion"; 1,709 is written "onethousandsevenhundrednine".
* stolen from http://www.itasoftware.com/careers/puzzle_archive.html
@saml
Copy link

saml commented Mar 12, 2014

1,709 is written "onethousandsevenhundrednine".

It should be onethousandsevenhundrednine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment