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.
Welcome to Codewars!
1.) The input parameter
num
is a number so you can't use split on it. You need to cast it to a string first.2.) You must return the final answer, not print (puts) it to the console. You need to return the answer as an integer. Input of 3212 must get an output of 9414 only by returning it.
3.) You must return your answer as a number, not a string.
This comment is hidden because it contains spoiler information about the solution
@AcesOfGlory is correct.
If you read some of the other comments to this Kata, you will find many others that had the exact same issue.
My favorite example is this: https://www.codewars.com/kata/554b4ac871d6813a03000035/discuss#5862f485e20244604600003b
This comment is hidden because it contains spoiler information about the solution
Which programming language?
This comment is hidden because it contains spoiler information about the solution