Teaser 1946: Not the millennium bug
From The Sunday Times, 2nd January 2000 [link]
Do you remember all that fuss over the “Millennium bug”?
On that New Year’s Day I typed a Teaser on my word processor. When I typed in 2000 it actually displayed and printed 1900. This is because whenever I type a whole number in figures the machine actually displays and prints only a percentage of it, choosing a random different whole number percentage each time.
The first example was bad enough but the worrying this is that is has chosen even lower percentages since then, upsetting everything that I prepare with numbers in it. Luckily the percentage reductions have not cut any number by half or more yet.
What percentage did the machine print on New Year’s Day?
This puzzle is included in the book Brainteasers (2002). The puzzle text above is taken from the book.
[teaser1946]
Jim Randell 9:26 am on 15 November 2020 Permalink |
See also: Enigma 1419.
We assume that both the original puzzle (prepared on 2000-01-01), and the puzzle text presented above were created using the faulty program.
So, on 2000-01-01 the setter typed a whole number, X, which was replaced by the value aX, where a is some whole number percentage less than 100% and greater than 50%.
In relating the story for this puzzle, the setter has typed the values X and aX, and these have been replaced by values multiplied by b and c respectively, where b and c are different whole number percentages, less than a and greater than 50%.
So, we have:
This Python program runs in 44ms.
Run: [ @replit ]
Solution: On 2000-01-01 the machine used a value of 80%.
So the setter was attempting to enter 3125, but instead the program printed 80% of this = 2500.
In relating the story, the setter typed: “When I typed in 3125 it actually printed 2500”, but these values were replaced using percentages of 64% and 76%, to appear as: “When I typed in 2000 it actually printed 1900”, as in the puzzle text.
LikeLike