Python Classroom Series – 18/May/2021

Project Euler Problem 6

Hi Jarvis Help me out,
Take input and remember it as max_number
sum_of_numbers = (max_number * max_number+1) // 2
sum_of_squares = 0
repeat from index = 1 till index <= max_number
    sum_of_squares = (index*index) + sum_of_squares

result = (sum_of_numbers * sum_of_numbers) - sum_of_squares

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin