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.
After trying it out I can confirm: brute force does not pass in Ruby (but it does in some other language...).
vrode ya reshil, no esli dobavlu proverky v konce to po vremeni ne uspevaet. Vnatyre hyeta
I solved this kata a long time ago, in several languages but not in Ruby so I cannot be sure, but try to avoid brute force and find a trick working directly from the number's digits.
I figured. Any pointers you can offer? I'm using Ruby.
Shorter code does not mean more efficient code, at all.
This comment is hidden because it contains spoiler information about the solution