Problem 2126. Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
Solution Stats
Problem Comments
-
4 Comments
Try to use "unique(floor(..." in the test cases. Isn't it Alfonso?? ;-)
This problem is quite well constructed and described. However, per the WP article linked to, it is important to specify two additional requirements: 〔1〕 Denominators must be positive. This is not explicitly mentioned in the Problem Statement [although perhaps it's implied], and moreover it's not checked in the Test Suite. That means 3/4 = 1/(1) + 1/(-4) would be erroneously accepted. 〔2〕 Each of the denominators must be different/unique. That is enforced in the Test Suite, but there's no mention of it in the Problem Statement. —DIV
Can't submit a solution to this problem (temporary unavailability of MATLAB Service).
The test suite has been updated to include more robust checks on solutions and solutions have been rescored.
Solution Comments
Show commentsProblem Recent Solvers63
Suggested Problems
-
Find state names that end with the letter A
1106 Solvers
-
Remove the small words from a list of words.
1304 Solvers
-
1253 Solvers
-
353 Solvers
-
Polite numbers. N-th polite number.
152 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!