[Project Euler] – Problem 06

Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
Trova la differenza tra la somma dei quadrati e il quadrato delle somme dei primi cento naturali.

print (sum(i for i in range(1,101)))**2 - sum(i**2 for i in range(1,101))

non ci sono commenti

Rispondi