Skip to content

Sunday Times Teaser 3155 – Increasing temperature

by BRG on March 11, 2023

by Victor Bryant

Published Sunday March 12 2023 (link)

I have written down an above-freezing temperature, a whole number of degrees Celsius, in which the digits are all different and are in decreasing order. I have then calculated the Fahrenheit equivalent. It is also a whole number whose digits are all different, but here the digits are in increasing order.

If I told you the first digit of the Celsius temperature, then you would not be able to calculate the temperature. However, bearing that in mind, if I now told you the final digit of the Celsius temperature, then it would be possible to calculate it.

You should now be able to work out the Celsius and Fahrenheit temperatures.

What are they?

From → Uncategorized

5 Comments Leave one →
  1. Brian Gladman permalink

    Here is a simple solution:

    and here is a slower version that checks all possible solutions:

  2. John Z. permalink

  3. John Z permalink

    Using a dictionary instead of matrices gives even tighter code:

  4. John Z permalink

    Checking all possible solutions:

  5. John Z permalink

    Using a dictionary without the benefit of ‘defaultdict()’ to store possible solutions. Inspired by Brian’s code for Teaser 3156. Can anyone see a way of compressing lines 18 & 22 into a single assignment statement?

Leave a Reply

Note: HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS