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.
the problem with this is for very large denominators, the while loop will also execute for a large number of times. it's better to have a GCF function instead
i don't get why this is considered as a best practice. the code is very hard to read; please use descriptive yet short variable names next time. you can get a cleaner solution also by using a recursion, which i consider is better than having so much nested loops. check my solution
you can take the vars outside of the function so that it wont be recreated every step of the recursion
you can use toString().length to get the number of digits instead of looping. Or better, toString().split("") and then get the length while also getting the digits individually