Description

You are given a non-negative floating point number celsius. Convert it to Kelvin and Fahrenheit, returning both values in an array [kelvin, fahrenheit].

Examples

Input:celsius = 36.50
Output:[309.65,97.70]
Explanation:

K = C + 273.15, F = C * 1.8 + 32.

Input:celsius = 0
Output:[273.15,32.00]
Explanation:

This is the freezing point of water. K = 0 + 273.15 = 273.15, F = 0 * 1.8 + 32 = 32.00. This demonstrates the baseline conversions where Celsius is at its minimum constraint value.

Input:celsius = 100.00
Output:[373.15,212.00]
Explanation:

This is the boiling point of water at sea level. K = 100 + 273.15 = 373.15, F = 100 * 1.8 + 32 = 212.00. This is a common reference point that students can easily remember and verify.

Constraints

  • 0 ≤ celsius ≤ 1000

Ready to solve this problem?

Practice solo or challenge other developers in a real-time coding battle!