Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I'm using Ruby to solve this. If I run Math.cbrt(216) % 1 in CodeWars I get 8.818 etcetc. But when I run it in irb I get 0, as expected. Anyone know what's up with that?
code's gotta go red before it goes green!
I am having the same problem. Giacomo this is the book you are recommending correct?
https://mitpress.mit.edu/books/introduction-algorithms
`each': failed to allocate memory (NoMemoryError)
yes thank you that worked!
am I missing something? this test failed, but my result seems to match the expected.
Expected: "Phone => 1-908-512-2222, Name => Peter O'Brien, Address => High Street CC-47209",
nstd got: "Phone => 1-908-512-2222, Name => Peter O'Brien, Address => High Street CC-47209"
if anyone needs it, this helped me to make the binary numbers
http://www.mathcs.emory.edu/~cheung/Courses/255/others/BinNumReps.html
I haven't gotten my code to pass the tests but maybe an if statement would do it? i.e. if n**3 + (n-1)3..+13 does not equal or is greater than m, return -1. again, I haven't passed this yet so maybe I am speaking out of turn but maybe this might help you!
This comment is hidden because it contains spoiler information about the solution
thanks! nice Kata!
thanks so much! that cleared it up for me!
Hi-I had a hard time solving this too, I didn't really understand the question and had a hard time visualizing it. One thing that helped me was to look at diagrams of 2 cubed, 3 cubed, etc. You'll see that 2 cubed has zero rows in between, but that 3 cubed has 1 row between. 4 cubed has 2 rows in between. Hope this helps you a bit!
This comment is hidden because it contains spoiler information about the solution