• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.



Page history last edited by Kenneth Finnegan 12 years, 2 months ago

Project Euler Problem #8


Nothing too clever about this solution, just brute forced it.  The most interesting part about my solution was how I quickly changed the 20 lines of numbers into one string in vim:

19J     J concatenates the next line onto the current.  19 does it 19 times.

:s/ //g     This is the typical search and substitute function, replacing all the spaces with nothing.  Had to readd spaces for the char input[] = "... part, but thats easier than deleting 19 spaces in the number.




Return to list of solutions

Comments (0)

You don't have permission to comment on this page.