**61°F, 16°C**
82°F, 28°C
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`
or
`(10x+y)(9/5) + 32 = 10y+x`.
The first one, with some algrebraic manipulation, becomes:
`50x + 5y - 160 = 90y + 9x`
41x = 85y + 160
x=(85y+160)/41
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: 40°F and 4°C
y=1, x=6: 61°F and 16°C
y=2, x=8: 82°F and 28°C
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 61°F (16°C) when I went to work, and 82°F (28°C) when I came home.
I also wrote the following small javascript to find the solutions:
for (var f=0; f<100; f++) {
x=Math.floor(f/10);
y=f%10;
c=Math.round((f-32)*5/9);
c2=10*y+x;
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. |