Friday, November 12, 2010

Euler project 11..n

So, Euler problems 1-10 have increased my knowledge of ruby, python, and pain. It's been fun, and took longer than I wish it had. Obviously it's time to start on #11.

11. http://pastie.org/1306770 This could use some refactoring, but it works. It took me a bit to figure out, but I learned a lot, and didn't steal anyone's code. Although rancor did tell me that string.split existed.

16. http://pastie.org/1342335 This one was disturbingly easy and I don't know why. Maybe I'm getting better at Ruby. Or their ranking system is off. Something. Yes, I skipped 12-15 so I could do this one quickly and feel happy.

20. http://pastie.org/1342458 This one was very similar to 16. Doing one makes the other easy.

13. http://pastie.org/1348523 my brute-force solution.

14. http://pastie.org/1348526 my brute-force solution. http://pastebin.com/JVDVBL0b rancorbeast's elegantish solution.