Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Project Euler

Name: Anonymous 2011-12-29 17:50

Hi /prog/,
I'm currently improving my fairly rudimentary programming skills by doing Project Euler exercises.
Problem 18 (http://projecteuler.net/problem=18) had me stuck for a while today, and now that I've solved it, I still can't help but feel that my way of doing it is awfully odd.
Here's a link to my solution: http://pastebin.com/YX4kW3dA
How would you have solved this problem?

Name: OP 2011-12-29 18:05

>>3
I have no clue how that code you've posted is supposed to work, but if the triangle was
  a
 b c
d e f

you'd just have to do a+b+d, a+b+e, a+c+e, a+c+f and see which is biggest.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List