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.
it's a good question, it will be quickly if you pay attention to details
This comment is hidden because it contains spoiler information about the solution
many thoughts
thoughts?
Scala translation
For
n=5
, what do you think is a valid answer for this problem? How much os1 + 2 + 3 + 4 + 5
? What does your solution return, and why?This comment is hidden because it contains spoiler information about the solution
I attempted a brute force function at first which had the timeout issues, then I figured out the algo by thinking about squares and triangles to come up with a quicker solution...however, at larger integers, python's math completely fails. I've double checked the math on a calculator and it should be returning a different result, but for whatever reason python is returning the wrong number. Not sure how to proceed with this one.
Lol that's cheating
There's always one goofball XD love it
or genius?
Having added the tag to your comment, it now cannot be seen by anyone that has not solved the kata in that language. So, you do not need to do anything else.
Do I need to do anything to fix this? Or has it been taken care of? Or do I need to repost but ensure the spoiler is in place?
Please do not post code without a spoiler tag (I just added to your comment).
This comment is hidden because it contains spoiler information about the solution