7 kyu
Sum of squares less than some number
124 of 1,848wichu
Description:
Write a function getNumberOfSquares
(C, F#, Haskell) / get_number_of_squares
(Python, Ruby) that will return how many integer (starting from 1, 2...) numbers raised to power of 2 and then summed up are less than some number given as a parameter.
E.g 1: For n = 6 result should be 2 because 1^2 + 2^2 = 1 + 4 = 5 and 5 < 6 E.g 2: For n = 15 result should be 3 because 1^2 + 2^2 + 3^2 = 1 + 4 + 9 = 14 and 14 < 15
Fundamentals
Similar Kata:
Stats:
Created | Aug 19, 2016 |
Published | Aug 19, 2016 |
Warriors Trained | 3050 |
Total Skips | 87 |
Total Code Submissions | 5364 |
Total Times Completed | 1848 |
Haskell Completions | 124 |
Clojure Completions | 65 |
Python Completions | 1011 |
F# Completions | 58 |
C Completions | 283 |
Ruby Completions | 48 |
COBOL Completions | 7 |
JavaScript Completions | 350 |
Julia Completions | 8 |
Prolog Completions | 5 |
Total Stars | 24 |
% of votes with a positive feedback rating | 89% of 355 |
Total "Very Satisfied" Votes | 293 |
Total "Somewhat Satisfied" Votes | 48 |
Total "Not Satisfied" Votes | 14 |
Total Rank Assessments | 12 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |