Problem 240. Project Euler: Problem 6, Natural numbers, squares and sums.
Solution Stats
Problem Comments
-
2 Comments
A problem where one must be at least a little careful about floating point arithmetic. It might have been interesting if one of the test cases were x=1e5 or larger. Even more interesting if the execution time were a factor in the "score". These factors might impact how the problem would be best solved.
@ Doug Hall, I have solved all the problems in the series. However, I have not received the badge and the associated scores on completion of the series. Can you please look into this?
Solution Comments
-
1 Comment
Adding comment for testing badges!!
-
1 Comment
Is there a more compact way to calculate the sum of squares? (like how I calculated the square of sums)
-
2 Comments
My solution is failing,please help me out
1. You used the wrong formula for the sum of the squares of the the first x natural numbers. 2. Also, your implementation of the square of the sum of the first x natural number is incorrect. 3. Finally, You are to subtract (1) from (2) not the other way round.
-
1 Comment
How can I view the solution?
-
1 Comment
can someone explain what the value and size of a correct answer means.
-
1 Comment
I think simpler is impossible. The only thing is that it needs 8 operations...
:(
-
2 Comments
For loops, not cool!
William, Why are for loops not cool?
Problem Recent Solvers1711
Suggested Problems
-
6736 Solvers
-
287 Solvers
-
ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
451 Solvers
-
467 Solvers
-
5391 Solvers
More from this Author51
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!