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.
The problem with this solution is the reliance on the for loop. This means the solution will not be as performant as approaches which just do the math based on the current value of nBlue. Of which, Joz's looks the best - https://www.codewars.com/kata/reviews/587bf2d95d56ae1a60000026/groups/587bf2da5d56ae1a6000002e.