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.
bool(false)
array(8) {
[0]=>
int(11)
[1]=>
int(19)
[2]=>
int(19)
[3]=>
int(19)
[4]=>
int(121)
[5]=>
int(144)
[6]=>
int(144)
[7]=>
int(161)
}
array(8) {
[0]=>
int(121)
[1]=>
int(361)
[2]=>
int(361)
[3]=>
int(14641)
[4]=>
int(20736)
[5]=>
int(20736)
[6]=>
int(25921)
[7]=>
int(36100)
}
Same in php
This comment is hidden because it contains spoiler information about the solution
Stuck exactly on the same test. I wrote the code in Golang. Cannot find the 190 in the
a
but checking the36100
within bI having the same issue when the problem is tried with Rust, like I mentioned in my own post. Interestingly, when I tried the same test with Python, the exact same test case expects False.
Which language?, make sure you're not confusing the log of one test with the expected result of another.
I guess there is a misunderstanding. The return value with those two arrays should be false, like you pointed out. But the test in the Kata expects true, which is incorrect.
No, the test with those input values expects false. Try printing some text with the input values. You're failing another test.
Looks like the one of the tests is not correct, and it fails incorrectly. I wonder how others passed the tests.
The test in question is this:
a = [121, 144, 19, 161, 19, 144, 19, 11]
b = [121, 14641, 20736, 36100, 25921, 361, 20736, 361]
Here the element 36100 in
b
has no matching squared rooted value, 190, ina
, so the return of the comp function should be false. But the test seems to expect true.