MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / problem6

Function problem6

project_euler/problem_06/sol3.py:12–15  ·  view source on GitHub ↗
(number=100)

Source from the content-addressed store, hash-verified

10from __future__ import print_function
11import math
12def problem6(number=100):
13 sum_of_squares = sum([i*i for i in range(1,number+1)])
14 square_of_sum = int(math.pow(sum(range(1,number+1)),2))
15 return square_of_sum - sum_of_squares
16def main():
17 print(problem6())
18

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected