there may be a few incorrect tests here (e.g. test 2 with 'X31.6X' and qty=111 should return '531.69' if I am interpreting correctly)
agree with alfonso
I had the same issue with that particular test case.
I've updated the test suite. It should work now. I selected the option to have all previous solutions rescored, but I've never actually seen that option work for other problems I've worked on, so just submit your solutions again. Also, refer to comments on http://www.mathworks.com/matlabcentral/cody/problems/42385-combined-ages-4-non-symmetric-with-multiples-n-3 regarding not being able to use the "Test reference solution" button currently. Is anyone else having that problem?
I believe rescoring doesn't work immediately, but all solutions seem to be rescored now. "Test reference solution" doesn't work for me neither. As far as I remember it's not the first time it doesn't work (on my account), but previous incidents had shorter duration (week or so).
That link doesn't work as written (at least, it didn't for me). It does function, though, if you truncate the url at #.
Funny behavior of possible over-reactive spam filter in Cody: changing this code to use instead of char(str2num('[49 36 49.... 36 50 57')) the actual char array '1$1...$29' will get you an "inappropriate content" flag... I admit no regexprep string should ever have that many dollar signs...
fails for partial_amt = 'X67.9X'; qty = 9; and many, many others
A bunch of your solutions now pass the test suite, so perhaps this comment is outdated?
In above case it returns 567.90, correct answer would be 167.94. This solution is minimizing last digit which works in most cases, but is based on wrong assumptions. It passes test, but doesn't solve the problem. Yes, my later submissions doesn't have this bug, but I'm unsatisfied when those wrong ones are going through the test alive :-)
You had me confused, since that specific combination isn't in the test suite, but I think I understand now. In your quest for perfection, you've been testing the solution against more test cases. That's the really difficult thing about making these problems—coming up with a robust test suite that's in-depth enough to only let completely correct solutions through.
Sorry Grant. Yes, I'm used to do more tests and I was suspicious about my algorithm.
Times 2 - START HERE
Remove all the consonants
Remove the polynomials that have positive real elements of their roots.
Tell me the slope
Rumis Scorer 1
Lights Out 1 - 5x5, 3 moves
Divisible by 8
Stress-Strain Properties - 4
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office