[x,y,y,y] is not an odd-length array. So this solution is right.
@g964 I really appreciate the effort you put with all the Katas, and as I was mentioning to you before - they are great!
But the descriptions and the test cases ... That is something, that have to be improved, since a lot of people are hiting this wall.
NASM translation submitted.
ok. thank you.
It's floor/to_i, just make sure you don't lose precision anywhere if you use floating point numbers (which isn't necessary in this kata in the first place). A slightest difference can become a difference of 1 after rounding.
This kata have some bug with rounding.
I alredy tried: floor, ceil, to_i, round, x - x%1
And in any case a got several solutions that dose not pass. Further I trited to combine to_f, to_i in different part of formule. The same result.
+1. To make this kata works: Need to add chagnges in the testing code, substitute Fixnum with Integer.
I got incorrect evaluating in auto-tests too.
Testing for 370787 Expected: "Jumping!!"
Testing for 932 Expected: "Jumping!!"
The logic is simple. Just coding need some time.
Rather than lots people say 6kyu. I would rank for 6.5 or 6.6 kyu.
6.5 or 6.6 kyu
This is a great kata. I liked it very much. But I think the rank of this kata is lower than it's actual state. 7kyu kata usually solved by couple lines of code, but here I have to wrote 3 methods. I think it's 5kyu.
If the task will only find x and y coordinates of a cat, it will be 7kyu kata.
About this issue. I explored Random test of n = 176, in this case 62 values are skipped.
And all of them are in 10*x + 3*y format.
10*x + 3*y
Here is a listing of skipped values:https://goo.gl/zqf5JC
@bestwebua Please give your's program output for n == 22 or n == 25.
+1. I agree Ruby random test dost not works correctly and skip values:
Here is a couple of skipped values:
"62 == 0 + 10 + 10 + 10 + 10 + 10 + 3 + 3 + 3 + 3"
"127 == 0 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3"
I had a lot of fun solving this kata. It literally descover different shades during working process. Thank you.