Project Euler [SPOILER #3]

Ian Macphail ian at runrev.com
Thu Feb 25 09:21:32 CST 2010


Ian Macphail wrote:
> put 100 into n
> put n * (n + 1) * (2 * n - 2) / 6 into total
>
> ;)
>
> _________________
Oops! forgot it was the square of the sum.

put 100 into n
put n * (n + 1) / 2 into a
put n * (n + 1) * (2 * n + 1) / 6 into b
put a * a - b into total



More information about the use-livecode mailing list