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.
Ok i understood now. Its no where mentioned(or maybe i didnt understand) taht first we have to check for the enire number.
What i understood from the question was that
952406 -> Remove first num -> 9 Bingo multiple of 3
similarly thats why i asked why is 36.
but now i understood. Thanks.
Let's start with a bigger number first and it will become clear.
952406 => not a multiple of three
95240 => not a multiple of three
9524 => not a multiple of three
952 => not a multiple of three
95 => not a multiple of three
9 => Bingo! return 9
36 => Bingo! Remove nothing, return 36
last number starts from the right (units' place, then tens', then hundreds' ...)
In the tests why does 36 return 36?
and what do they mean by last number? is it starting from left or right?
and from any side they start 36 should either return 3 or return 6 as both are multiple of 3. The question is not understood to me. Can please anyone help me understand the problem statement.
So is this a wrong test? As my test is also failing here
nope, you still need to do
import kotlin.math.pow
import here? how? I am using kotlin language
Math.pow(x,y) in JAVA. in kotling we do x.pow(y)
I think the method 'pow' belongs to the Math class. It's static so you invoke it like this 'Math.pow(someInt,someOtherInt)'
And it needs two parameters, no?
The Math class lives in java.lang so you don't need to import it.
Apologies if you're thinking of a different pow method.
You have to import it before you can use it.
Why does it give tis error : error: unresolved reference: pow
sum += (listOfNumbers[i].toDouble().pow(p + i))
I am trying to use the "pow" funtion. why does it say unresolved reference: pow?