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.
Approved
Thanks
Try adding checks with dummy returns before accessing collections similar to this:
to explicitly verify that your indexing is not off anywhere. If you can't find anything, post your solution here and I might look into it later.
I've just run 150k tests and got no errors, it'd be good if you managed to provide an input for which your solution is not working again. In the meantime, try adding logs everywhere to see whether your solution successfully passes all steps, like:
I'm not sure whether they will show up correctly due to the tests crashing with an error, but maybe it will provide some insight. Also, try running these cases from different batches of random tests to see if your parser handles them correctly:
Evaluating this expression in Python gives
8922.901960784315
, and my C++ solution produces the same result. Can you check whether your solution passes this test:Assert::That(calc("(64) * (-97 / 51 * -(55)) - (21 * -((((71 - -33)))) - 44)"), Equals(8922.901960784315))
? Maybe the error message shows rounded actual/expected values, and you can't actually see the error.Have you reset the trainer? If yes, can you provide an input for which your solution fails?
Changed the reference solution to remove double-to-string conversions.
I quote myself from my answer to mr360 from 9 months ago:
You are welcome! I'm glad you figured it out and especially so that it happened just after awakening for a new day.
well, since your code isn't actually failing this test, you need to turn your attention to the next test, which you are failing, and figure out why. print out the inputs. consider edge cases.
This test does not return
true
, it returnsfalse
. You are confusing the result with the test that comes after this test. Also: I said you had a mistake in one line your posted code. Have you thought about which line it is?@PUTIS aka Zverb . . . NO . . . kata does NOT say to return
true
. Look at the post before yours, where @ucczs has had the revelation of paying attention to the logs correctly. This test returnsfalse
. If you post your code with proper code markdown, (make sure to click the spoiler tag), I will be happy to dissect your code for errors. : )Oh I see, thanks @rowcased, this issue is indeed not the {2,2,3},{4,9,9} test, but the one which follows. Thanks for the hint :)
This comment is hidden because it contains spoiler information about the solution
Loading more items...