Draft
Sum Square Difference
56jamsgra
Description:
The sum of the squares of the first ten natural numbers is:
1 * 1 + 2 * 2 + ... + 10 * 10 = 385
The square of the sum of the first ten natural numbers is:
(1 + 2 + ... + 10) * (1 + 2 + ... + 10) = 55 * 55 = 3025
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 n natural numbers (n > 0) and the square of the sum, and then return the sum of the square of its digits.
e.g 2640 --> 2 * 2 + 6 * 6 + 4 * 4 + 0 * 0 = 56
Fundamentals
Algorithms
Mathematics
Similar Kata:
Stats:
Created | Nov 7, 2017 |
Warriors Trained | 141 |
Total Skips | 19 |
Total Code Submissions | 150 |
Total Times Completed | 56 |
JavaScript Completions | 56 |
Total Stars | 2 |
% of votes with a positive feedback rating | 76% of 34 |
Total "Very Satisfied" Votes | 22 |
Total "Somewhat Satisfied" Votes | 8 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 35 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |