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.
A little improvization on this solution will take care of null factor. Check my solution.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I agree with you it's not necessary to go as far as n+1. I will get timeout if I write it that way.
This comment is hidden because it contains spoiler information about the solution
str(digits[x]*2) - gives you a string, it consist of one or two characters
map( int, str(digits[x]*2) ) - transform your string to an int array
sum ( ---- ) takes sum of the elements, if the multiplication result is single digit then sum of array's elements equal to the element value. if the multiplication result is two digits then it takes sum of it, like should be described by the algorithm