Answer |
送交者: htapx 2008月07月28日14:13:52 于 [灵机一动] 发送悄悄话 |
回 答: Fahrenheit to Celsius 由 htapx 于 2008-07-26 20:00:25 |
Note that a temperature T converts back to T if and only if T + 9 converts
back to T + 9. Thus it is only necessary to examine nine consecutive temperatures. It is easy to show that 32 converts back to 32, 33 and 34 both convert back to 34, 35 and 36 both convert back to 36, 37 and 38 both convert back to 37, and 39 and 40 both convert back to 39. Hence out of every nine consecutive temperatures starting with 32, five are converted correctly and four are not. For 32 ≤ T < 32 + 9 · 107 = 995. There are 107 ·5 = 535 temperatures that are converted correctly. The remaining six temperatures 995, 996, . . . , 1000 behave like 32, 33, . . . , 37, so four of the remaining six temperatures are converted correctly. Thus there is a total of 535 + 4 = 539 temperatures. |
|
|
|
实用资讯 | |