• 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! Dokkio, a new product from the PBworks team, integrates and organizes your Drive, Dropbox, Box, Slack and Gmail files. Sign up for free.



Page history last edited by Kenneth Finnegan 11 years, 10 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.