All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Temperature Reflection (Posted on 2003-09-29) Difficulty: 2 of 5
On my way to work, I pass by a digital thermometer outside a bank that displays the temperature to the nearest integer, alternating back and forth between Fahrenheit and Celsius at four-second intervals.

The other day, when I was going to work, I noticed that the temperatures displayed in Fahrenheit and Celsius were simply reverse digits of each other.

Well, it warmed up nicely during the day, and when I was on my way home, I looked at the same thermometer.
Imagine my shock when, again, the Fahrenheit and Celsius temperature displays were simply reversed digits of each other!

What was the temperature when I came in to work, and what was it when I was on my way home?

Note: To convert from degrees Fahrenheit to Celsius, subtract 32 then multiply by 5/9. To convert the other way, simply do the opposite (multiply by 9/5 and add 32). Ignore leading zeroes.

  Submitted by DJ    
Rating: 4.2308 (13 votes)
Solution: (Hide)
61F, 16C
82F, 28C

First, the problem states that both temperatures have 2 digits.
A 2-digit number can be represented as 10x+y, where x is the first digit and y is the second.
Reversing these digits, simply enough, gives 10y+x.

In this problem, the number is reversed when converted from Fahrenheit to Celsius, or vice versa.
That gives us one of two equivalent equations:
(10x+y - 32)(5/9) = 10y+x
(10x+y)(9/5) + 32 = 10y+x.

The first one, with some algrebraic manipulation, becomes:

50x + 5y - 160 = 90y + 9x
41x = 85y + 160

The second equation evaluates the same way, with x and y reversed.

At this point, we can simply plug in each digit for y to find the values for x that are nearest to an integer (so that when the actual temperature is evaluated, it rounds correctly).

y     x      
0   3.9024...
1   5.97560...
2   8.04878...
3   10.12195...
Since x must be a single digit, y can be only 0, 1, or 2 (for higher numbers x is greater than 10), and there are only three possibilities:
y=0, x=4:  40F and 4C
y=1, x=6:  61F and 16C
y=2, x=8:  82F and 28C
However, since both temperatures should have two digits when written both ways, 40 and 4 is eliminated (we are told to ignore leading zeroes).
Thus, it was 61F (16C) when I went to work, and 82F (28C) when I came home.

I also wrote the following small javascript to find the solutions:

for (var f=0; f<100; f++) {
  if (c==c2)
    document.write(f + ", " + c + "<br>");
This outputs:
40, 4
61, 16
82, 28
But again, we throw out the solution containing just 4.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
JavascriptDej Mar2006-02-26 22:26:08
MS Excel solutionjohn2005-06-08 19:22:38
re(3): computer solutionabc2003-09-30 14:07:39
re(2): computer solutionCharlie2003-09-29 20:13:17
Solutionshort solutionTristan2003-09-29 18:24:23
re: computer solutionabc2003-09-29 15:14:59
Solutioncomputer solutionCharlie2003-09-29 11:00:07
Solutionproofabc2003-09-29 10:36:22
SolutionRiaan2003-09-29 09:04:36
SolutionSolutionnikki2003-09-29 08:55:21
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (7)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (5)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2020 by Animus Pactum Consulting. All rights reserved. Privacy Information