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.
Very badly designed !!! There is a severe overflow bug in the C++ random test cases. So the correct solution could not be accepted. Also, since the error of the overflow is dependent on the implementation. So I have to try several implementations to "fit" this kata.
If the author could not figure out how to make a bug free non-overflow solution, at least he can refine the problem description, for example, one can ask for the result modulo 1000007.
This comment is hidden because it contains spoiler information about the solution
There are three kinds of string enclosing marks in javascript : double quote ("), single quote (') and apostrophe (`). When using apostrope, you can use expression in the string surrounded by ${}.
So instead of
var a = 3;
var b = "I've read " + a + " books.";
We can rewrite it as
var a = 3;
var b = `I've read ${a} books.`;
This comment is hidden because it contains spoiler information about the solution
Good kata to learn this.
ES6 makes my life easier.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution