News for hackers. Stuff that matters.
Re:Project Euler by carapace on Monday December 11, 2017 @03:31PM (#15900164)
Oh cool!

I've been working with a continuation-pasing style variant of Joy (https://en.wikipedia.org/wiki/Joy_programming_language https://github.com/calroc/joypy) and tried it on the Project Euler problem 1: https://github.com/calroc/joypy/blob/master/docs/3.%20Develo...

I came up with a solution that generalizes to blocks of terms, but yours is much much nicer! Cheers!

""" Between 0 and 990 inclusive there are sixty-six "blocks" of seven terms each, starting with:

    [3 5 6 9 10 12 15]
And ending with:

    [978 980 981 984 985 987 990]
If we reverse one of these two blocks and sum pairs... """

The Advent of Code 2017 includes a puzzle involving a "spiral" memory grid and I had a similar thing where I was able to figure out a simple mathematical way to solve the puzzle: https://github.com/calroc/joypy/blob/master/docs/Advent%20of...

I'm not explaining it well 'cause I'm all excited to show it.

There are no comments on this comment yet.