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.
I agree with OP. The attempt should be false on this exact example, because $a1[2] squared is not $a2[3]. This is the exact comparison that comes up in my code in the false case, yet the test for this set of arrays is expecting true. 19 * 19 (361) does not equal 36100.
For everyone struggline with the test-cases, especially the "fixed cases" when attempting the full solution:
If everything but one (or more) test fails - put in some proper debugging, also for your positive cases!
I stumbled across my own feet when trying to debug one case which the output of "False should equal True" was not even meant to be attached to. When implementing proper debugging for each and every case I spotted my mistake and could easily fix my issue just one minute after it. Though being 3 kyu, I spent a lot more time debugging this than I wanted to. This should teach me a lesson, I guess :D
sus... :D
not a kata issue
DRY :-)
Which part don't you understand? The mathematical or the progamming part? On either part you can work. ;)
If I were you I wouldn't let myself down or doubt myself because I don't instantly get the solution done. It always takes some time to understand the problem, work on a solution and then implement it. Sometimes you are stuck, sometimes you get frustrated. But that's normal. I'm stuck on some Katas as well.
Here's my solution:
I'm pretty sure you'll get this one done. ;)
Not a kata issue if your PC works differently.
This comment is hidden because it contains spoiler information about the solution
Gotta admit that I was thinking way too complicated but I really enjoyed this Kata so damn much! Cheers mate for this splendid piece of work! :>
First line:
Now you know why it fails. Also, you missed some word with 27 occurrences there, have you tried printing the input?
This comment is hidden because it contains spoiler information about the solution
Well, your message is quite vage about why you fail or which error message it displays. Mine failed because of the wrong usage of variables which differs from this environment to your local one.
lol, my horrible solution passes the Kata? No checking for primes?
(Note: I've forked this Kata to add Prime-checking)
Same here, I giggled very loudly as I saw the solution of others. I actually did not spend a whole lot of time writing the code because I have already had a solution at this Kata = https://www.codewars.com/kata/5d5a7525207a674b71aa25b5
Only added two more lines to this solution and fell off my chair as I saw how stupid and simple the solution was to this one :D
So, see you at night shift at the factory, I guess :D
I know this looks ugly, but it works. I'll refactor soon, but I am still learning. :D
Loading more items...