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.
yes, Sry about that. I had trouble with running code and didnt know what else to do. Then i realised maybe i should try and return empty list for empty input. It worked.
I tried to print the input provided via test cases but it printed an empty string. I cant do operations on empty list. If anyone could help with this it would be great. Thanks.
nvm i tried to explain and i dont know how to delete the comment so im editing this.
might not need to store all the data in list when you can return value with first occurence.
thanks i didn't see 'question' tag my bad. This should help me out with the solution.
This comment is hidden because it contains spoiler information about the solution
it simply means you have to multiply digits of entered number repeatedly until you get one digit. so suppose for 27> 27=14(but 14 is 2 digits, so we repeat )>14=4(now we got a one digit number). As you can see here we had to multiply 2 times to get to one digit. Therefore our output is 2.