Problem 44348. Seemingly impossible problem
Solution Stats
Problem Comments
-
2 Comments
Add more tests, for example:
Test1 : 0->1
Test2: 1->1
Test3: 0->2
Test4: 6->6
Test 6: 0->0
...
Hello, Jean-Marie Sainthillier. Thanks for the suggestion. If I understand you correctly, that could be done, but it would break all/most of the previous submissions, so it seems better to do that in a separate problem — if you would like to make one. —DIV
Solution Comments
-
2 Comments
You should try the timer function.
Nice thought. I _eventually_ got that to work (Solution 1463623), but it also seems a bit clunky in the end, and it completely fails if implemented without an additional explicit instruction that ensures control is not returned to the "command prompt" (and hence the Test Suite!) until after the specified timer period has elapsed.
-
2 Comments
Would this also work if the y_correct values were 3, 2, 1 instead of 1, 2, 3?
The code _as is_ wouldn't work, but it could easily be adapted. Either with a switch statement, or by simply calculating 4 – {erstwhile result};
Problem Recent Solvers24
Suggested Problems
-
Read a column of numbers and interpolate missing data
1881 Solvers
-
266 Solvers
-
Program an exclusive OR operation with logical operators
691 Solvers
-
Make an awesome ramp for a tiny motorcycle stuntman
439 Solvers
-
756 Solvers
More from this Author32
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!