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.
I did it :)
The numbers used in the tests were far bigger than even u128 (what I think it's the biggest number in rust), which ruled out the possibility of using the "naive method" of storing the result in a normal variable. So what I did, rather than simply adding the numbers, was use both the sum and multiplication algorithms in order to calculate each digit alone, rather than the whole. That solution, unfortunately, used a whole lot of vectors with a whole lot of data which, I suppose, were the source of the bad performance. I understand that there are better solutions but not counting mine as correct made me really sad and frustrated, despite knowing that that is how codewars works. Nevertheless, I don't think I'll give up just yet; so if I ever get the time and the motivation I'll try it again. That's the reason why I haven't unlocked the other solutions yet.
So yeah in a nutshell there were no infinite loops, my substandard code was the reason why it timed out, and this comment was just me, really frustrated, rambling about it because this has been happening to me a lot. I'll try to do more research next time… and if possible, make a one liner, rather than more than 100.
I've gotten execution time out after an hour or two of work. My code works, but it isn't efficient enough, apparently. The worst is that that has been happening in the majority of kata I do. It's a real bummer, and my motivation do to katas kinda plummeted after this one. I'm really sad.