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.
Favourite Kata so far. Love the no nonsense description too.
Had the same problem, fixed it in the following way.
Your solution doesn't account for rounding. Eave time you loop you should round curr to an integer.
P.S. you can just use p0, you don't have to make curr = p0.
I really liked this one! It was a great low level debugging challenge to catch the rounding issue.
It feels fair rather than mean on account of it warning me in the description. GGs all around.
in the future, please do not use the
issue
tag to ask for help and use markdown to post your code(see there).
Debug your code. I added this line to your code, and this is what I see for
n = 56789
:whereas the proper rotations of
56789
as shown in the description are:This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Passed all test cases except 1 with -> (p = 1000, percent = 2.0 and aug = 50).
Please fix this one so that I can submit my solution.
i think this is a little hard for a 6 kyu kata
Интересный ката, пришлось поднапрячь извилины, чтобы понять условие, ну а так несложный ката, весьма быстро и легко решается😌
Be careful. As is said in Description: "Same" means, here, that the elements in b are the elements in a squared, regardless of the order.
Order doesn't matter, but quantity does. It's in the first sentence of the description:
Given two arrays a and b write a function comp(a, b) (or compSame(a, b)) that checks whether the two arrays have the "same" elements, with the same multiplicities (the multiplicity of a member is the number of times it appears).
So why does the first example return true?
squares from [121, 144, 19, 161, 19, 144, 19, 11] it will be [14641,20736,361,25921,361,20736,361,121] Which is different from [121, 14641, 20736, 361, 25921, 361, 20736, 361]
As far as it is clear from the conditions , it is necessary that all elements from the array2 array be equal to the number squared from array1 . There is no word about the same order or quantity.
Don't post solutions in discourse like that, it's forbidden.
This comment is hidden because it contains spoiler information about the solution
Naah this was wayy to fun I just forgot once that functions cant be inside other functions lol but other than that I found it very intriguing. I also didnt really understand what was wanted from be but I found what they meant in the questions section.
Loading more items...