Represent those numbers as integers in your program
Replace each number with that number times its line number
Write the file out elsewhere
And complete the task right now at your computer as fast as possible, you’re being timed
Think—what language would you immediately reach for? Do you start your experimentation with ipython, or irb? Do you pop open Eclipse and write some Java? Or create a new .cpp file?
I have 13 years of experience leading teams in building and designing web applications in a wide variety of languages and platforms - some pretty big ones, too.
I would not be able to do this in any language without looking at the API.
And they wonder why "It's so hard to find good people!"