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.
Your code timing out is not an issue. Please refer to the documentation: https://docs.codewars.com/training/troubleshooting/
This comment is hidden because it contains spoiler information about the solution
ui ones[101] { // ones count (0 -> 100)
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,
3,3,4,2,3,3,4,3,4,
4,5,1,2,2,3,2,3,3,
4,2,3,3,4,3,4,4,5,2,3,
3,4,3,4,4,5,3,4,4,5,4,
5,5,6,1,2,2,3,2,3,
3,4,2,3,3,4,3,4,4,
5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3
};
ui rangeBitCount(ui a, ui b) {
ui 1s(0);
while (b >= a) 1s += ones[b--];
return 1s;
}
----> it always (Execution Timed Out (12000 ms))
good but slow
waht?