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.
Um, it would also be nice if I can see when I (and maybe other users too) completed a kata in a language.
It would be in my profile, something like:
Doesn't work with really large m or n anymore. I failed at n = 45001 and n = 450010. The tests now go far beyond that.
Thank you for your answer. Such application of maths into CS.
I ended up looking through Bernoulli polynomials, Nicomachus's theorem, Faulhaber's formula and stuff, none of which I understand.
But I'll start reading more on Maths from now. And on algorithms.
If you can kindly point to some resources, that'd be so great.
But thanks again for your inspiring solution.
Yep. My solution is accepted, and it's wrong.
This comment is hidden because it contains spoiler information about the solution
There is a small error in the Ruby version.
Instead of
//TODO: complete
,it should be
#TODO: complete
There's a syntax typo in the Python test case.
Currently is test.assert_equals(words_to_sentence(['bacon', 'is', 'delicious'], 'bacon is delicious');
Should be "test.assert_equals(words_to_sentence(['bacon', 'is', 'delicious']), 'bacon is delicious');"
I know my submission was not correct at all, but it passed the test anyways. I think we need a mathematical proof for this kata. Something like, there exists an y value so that if val < x < val + y, there will always be an x value that satisfies the instruction.