# Project Euler Problem 6

Problem 6

The sum of the squares of the first ten natural numbers is,

12 + 22+ ... + 102 = 385

The square of the sum of the first ten natural numbers is,

(1 + 2 + ... + 10)2= 552 = 3025

Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640.

Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
# 求前一百个自然数平方和与和平方的差值。
l1 = [x**2 for x in range(1,101)]
sum1 = sum(l1)
sum2 = (sum(range(1,101)))**2
diff = sum2 - sum1
print(diff)

#### Project-Euler problem 1-50

2015-01-31 00:09:48

#### Project Euler Problem 71-80

2016-02-27 20:34:47

#### project euler problem 24

2013-10-10 22:53:43

#### Project Euler problem 66

2013-10-01 18:19:27

#### Project Euler:Problem 8

2015-05-30 12:16:18

#### Project Euler：Problem 23 Non-abundant sums

2015-06-01 22:12:14

#### Project Euler：Problem 45 Triangular, pentagonal, and hexagonal

2015-06-05 15:28:10

#### ProjectEuler题解（更新到100题）

2016-12-14 12:10:36

#### project euler 13

2015-12-04 20:45:53

#### Project Euler Problems 19-22 Python实现

2015-12-22 11:54:06