It makes no sense to speak of the mixture being part acid and part water. In fact the quantity of water is always 100, and the acid has a certain strength. It would have been better to get us to calculate the acid strength
Needs more test cases to disqualify the non-solutions that simply exploit the test-case space.
More test cases in the Test Suite is generally welcome, and also the threat of potentially adding (even) more cases in the future can deter hard-coded "non-solutions".
Most the leading solutions are just overfit the test cases, and meaningless.
This problem seems weird, I've solved the last test with hacking after using harmonic mean for the others, because I've imagined the speed was constant. However, people who solved without a hack acted as the speed was decreasing. And that doesn't make sense to me (it is not written at the problem description). The problem description IMHO needs to be changed if that's what the author was aiming. If you are reading this before trying to solve it, please, think about exponential decay. It is not linear despite the problem not saying so. Without this previous sentence, one may lose time trying several different solutions (like some people did in the solution set) or just hack it instead of learning something new (just point people at the right direction; they still can try some other technique if they want). Especially since the goal in Cody is to create a small solution.
And I agree that more test cases should be added, besides improving its description. In Cody, there are broken tests. So we can never be sure at times wether our code or the test set is bogus.
Test 1 fails if the value is equal to result.
@Creator - Check the test suite
what does it mean? how?
Find the two most distant points
The Hitchhiker's Guide to MATLAB
Given a window, how many subsets of a vector sum positive
03 - Matrix Variables 4
Least common multiple of many numbers
Inner product of two vectors
Predicting life and death of a memory-less light bulb
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