could you provide some sort of indication as to the precision of said number?
please fix the errors in the solution check, or at least use consistent precision :/
My calculation suggests test 3 should have an answer of approximately 465.661, which is tricky to round to 465.5. (Not impossible, but not obvious/intuitive, and not consistent with answers specified for the other tests.) . . . Why was it like this? My guess is that all three answers were adapted directly from the three rows in the contemporary WP article linked to in the problem statement ( https://en.wikipedia.org/w/index.php?title=Hard_disk_drive&oldid=476051941#Units_of_storage_capacity ), to wit: * 100MB = first row; * 10GB = one tenth of second row; * 500GB = half of last row. This yields the peculiar rounding found in the Test Suite.
This problem is not correct at all. Test suite values were probably copied from Windows or somewhere in which they've rounded up the requested factor to 3 decimals. And even worse, sometimes this had been twice (at the factor, and after multiplying it by the alledged value).
Sorry but I don't understand your rounding results.
You were going at the right direction. The issue is that the author probably copied a rounded value from somewhere.
I would consider this to be the best solution, though it fails the test cases (only because of the precision of the test suite answers).
Actually, this solution is creative, but wrong, even without the rounding issues. The needed factor is found by finding the difference between the decimal and the binary representation.
Project Euler: Problem 9, Pythagorean numbers
Swap the input arguments
How many monitors are connected ?
CONVERT TAN TO SIN
Back to basics 23 - Triangular matrix
Valid Chess Moves
Back to basics 22 - Rotate a matrix
Bottles of beer
Back to basics 3 - Temp Directory
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