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.
Original
Java
Kata was 8kyu. Some translations may or may not deserve to be different, but CW does not work that way.Done in lua, this doesn't feel like an 8 kyu kata though. I feel like pattern matching is a very niche thing that not many new coders know about. Someone who is new to coding, probably won't know how to solve it.
It isn't difficult or anything, it just feels like it relies on you knowing that one bit of information.
This comment is hidden because it contains spoiler information about the solution
Solved it. And you were right, I messed up the rounding. I misinterpreted what was asked, thanks for the help.
In brief: you give away the solution. I don't know what you are doing in your code, and you say nothing about the failures. Make sure you round the result as it is required in the description.
Care to explain what do you mean by it being a "full calculation process"? It seems to me like a simple calculation that can be presented in a formula.
Is my calculation incorrect? if not then why does it give a different answer from the kata's answer when A = 1.
Really hoping you'd explain, I'm trying to learn here... :p
This is not just a math formula, it is a full calculation process. By the way, the formula isn't even in the description, that must be for some reason. I marked your message with a spoiler flag. However it's quite unlikely someone who didn't solve the kata will answer you.
This comment is hidden because it contains spoiler information about the solution
Brilliant exercise, great practice for loops and arrays inside arrays. While it was fairly easy and straight forward took me a couple of minutes to figure out why my code didn't return the proper result. Turns out I forgot that I had to multiply by 20 at the end... ah well :)
This comment is hidden because it contains spoiler information about the solution
Felt like great exercise for someone like me who's still learning. But the description is lacking, had to look into the the discourse to figure out what is being asked of me.
Will this work if r <= 0?
Seems to me it won't, I could be wrong. If I am wrong here, could someone please explain why?
like If r == 0, then r%2==0 so it returns (0, string..string)....... infinite loop