Consider the following flowchart: INPUT Subtract Divide by Add OUTPUT. If the OUTPUT is 32, what was the INPUT?
CEMC Cayley
Solution
We start from the OUTPUT and work back to the INPUT. Since the OUTPUT 32 is obtained from adding 16 to the previous number, then the previous number is . Since 16 is obtained by dividing the previous number by 2, then the previous number is or 32. Since 32 is obtained by subtracting 8 from the INPUT, then the INPUT must have been .
Want a route through all this instead of an archive? The track
puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.