You and your friend are playing a game with the CASIO fx-570EX calculator.
The game proceeds as follows:
- Your friend types a number, then presses a left parenthesis, and then types another number(e.g.,
17(65537
). Each of the numbers must be represented by either a single digit (0-9) OR a digit of (1-9) followed by multiple (0-9)s. - Then, without pressing any more buttons, your friend covers the screen of the calculator and hands it to you.
- You should press some buttons without knowing your friend's input, to calculate the sum of those two numbers. In this case, you might press
<LEFT><LEFT><LEFT><LEFT><LEFT><DEL><+><=>
to get the correct answer, which is65554
.
However, the above button presses will only work for limited inputs; the solution will only work for inputs where the second number is five digits long.
Therefore, you face this question: in which way should you press the buttons to make sure you always get the correct answer?
- Moreover, what is the minimal number of necessary button presses?
- (Yet unsolved) Can you find the solution that is capable of calculating the sum of big numbers(close to 10^9), without making any discrepancies?
Notes:
- The CASIO fx-570EX calculator looks like this. This is the only calculator acceptable for now, because it is the only one I can test.
- Any buttons on the calculator can be used in your solution. You can even press
<=>
multiple times(without checking the result), as long as you get the correct answer after the final<=>
. - You can make use of errors ONLY IF they can be detected outside of the calculator screen. I don't think this is possible, because this calculator doesn't make sounds as far as I know.
- As this is my first puzzle, please let me know of any ambiguity.
- I have found my own solution, and I think I will post it after some time passes.