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.
This comment is hidden because it contains spoiler information about the solution
My bad. I actually did a index out of bounds... you probably should deal with that situation, or you don´t. Anyway, it worked, and was a good practice.
I first checked if the number can be diveded by the sum of its digit. But still for 30 it is slow...
When I run tests I just got (x 11) as a textual output, which doesn´t help me a lot. Even when I reimplemented tests to use assertArrayEquals I didn´t get any useful feedback. I tried with Java, probably something is broken. It also swallowed stdout, so no idea what x 11 means.
I think there should be some rule by which we can filter out numbers in a quicker way than brute-force. But I also need to find that.
Is it possible in Java not to cross the time limit? I tried many optimizations... but still "slow". Case 16 can run, but case 30 times out, still...