projects
/
sandbox
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merging in 6 year old repo of project euler files
[sandbox]
/
euler
/
py
/
euler-0006.py
1
#!/usr/bin/env python
2
3
from euler import *
4
5
def sum_of_squares(n):
6
return sum(itertools.imap(square, count_to(n)))
7
8
def square_of_sum(n):
9
return square(sum(count_to(n)))
10
11
result = square_of_sum(100) - sum_of_squares(100)
12
13
print result
14