A greenhouse's climate controller only reports its internal probe reading on the Celsius scale. The facility dashboard needs the same reading translated into the two other scales used on site: the Kelvin scale used by the automated logging system, and the Fahrenheit scale shown to on-site staff.
Given the Celsius reading, compute the equivalent Kelvin and Fahrenheit readings using:
Kelvin = Celsius + 273.15 Fahrenheit = Celsius * 1.8 + 32
A single line containing one real number C, the Celsius reading, written with at most 2 digits after the decimal point.
Print two real numbers separated by a single space — the Kelvin equivalent followed by the Fahrenheit equivalent — each rounded to exactly 5 digits after the decimal point.
-273.15 <= C <= 10^5, given with at most 2 digits after the decimal point.
Example 1
Input
36.50
Expected
309.65000 97.70000
Explanation
Kelvin = 36.50 + 273.15 = 309.65. Fahrenheit = 36.50 * 1.8 + 32 = 65.7 + 32 = 97.7. Rounded to 5 decimal places: 309.65000 97.70000.
Example 2
Input
-40.00
Expected
233.15000 -40.00000
Explanation
Kelvin = -40.00 + 273.15 = 233.15. Fahrenheit = -40.00 * 1.8 + 32 = -72 + 32 = -40.0 (the classic point where the two scales coincide). Rounded to 5 decimal places: 233.15000 -40.00000.
Ready to solve this?
Sign in to open the editor, run your code against the sample tests, and submit against the full test suite.
Sign in to solve →