Calculator with Two Buttons Solutions
A calculator, initially displaying 0, has only two buttons: “+” adds 1 to the number on display; “x” multiplies number on display by 10. What is the least number of button presses needed to show 5034? (courtesy of Hakan Kjellerstrand)
Submit your solutions using your favorite tools or just common sense. How to make sure that your solution is optimal?
-
- No tools – submitted by Boro Vujosevic
- cDMN – submitted by Simon Vandevelde
- Prolog – submitted by Matteo Redaelli
- OPL CPLEX – submitted by Alex Fleischer
- MiniZinc – submitted by James Delonay
- …
You must be logged in to post a comment.