6 kyu
Build a pile of Cubes
23,856 of 88,351g964
Description:
Your task is to construct a building which will be a pile of n cubes. The cube at the bottom will have a volume of , the cube above will have volume of and so on until the top which will have a volume of .
You are given the total volume m of the building. Being given m can you find the number n of cubes you will have to build?
The parameter of the function findNb (find_nb, find-nb, findNb, ...)
will be an integer m
and you have to return the integer n such as
if such a n exists or -1 if there is no such n.
Examples:
findNb(1071225) --> 45
findNb(91716553919377) --> -1
Mathematics
Algorithms
Similar Kata:
Stats:
Created | Jun 30, 2015 |
Published | Jun 30, 2015 |
Warriors Trained | 254608 |
Total Skips | 66536 |
Total Code Submissions | 350521 |
Total Times Completed | 88351 |
C# Completions | 4973 |
Java Completions | 8970 |
Ruby Completions | 2463 |
Python Completions | 31293 |
JavaScript Completions | 23856 |
CoffeeScript Completions | 73 |
Haskell Completions | 580 |
Clojure Completions | 156 |
Elixir Completions | 261 |
TypeScript Completions | 1844 |
C++ Completions | 4811 |
PHP Completions | 2266 |
Crystal Completions | 27 |
F# Completions | 110 |
C Completions | 2817 |
Swift Completions | 732 |
Rust Completions | 1398 |
Go Completions | 1863 |
R Completions | 237 |
Shell Completions | 43 |
OCaml Completions | 27 |
Fortran Completions | 37 |
Julia Completions | 93 |
NASM Completions | 34 |
Nim Completions | 25 |
Scala Completions | 270 |
Kotlin Completions | 720 |
Groovy Completions | 23 |
Dart Completions | 414 |
Pascal Completions | 25 |
Raku Completions | 12 |
Perl Completions | 42 |
COBOL Completions | 12 |
Elm Completions | 10 |
D Completions | 9 |
Erlang Completions | 18 |
Prolog Completions | 15 |
Total Stars | 3053 |
% of votes with a positive feedback rating | 86% of 8359 |
Total "Very Satisfied" Votes | 6352 |
Total "Somewhat Satisfied" Votes | 1712 |
Total "Not Satisfied" Votes | 295 |
Total Rank Assessments | 34 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 8 kyu |