Tap here to switch tabs
Problem
Submissions

Problem: Convert the Temperature

Try to solve the Convert the Temperature problem.

Statement

You are given a non-negative floating-point number celsius representing a temperature in Celsius.

Convert celsius into Kelvin and Fahrenheit and return the result as an array [kelvin, fahrenheit].

The conversion formulas are:

  • Kelvin=\text{Kelvin} = celsius +273.15+ 273.15

  • Fahrenheit=\text{Fahrenheit} = celsius ×1.80+32.00\times 1.80 + 32.00

Constraints:

  • 0≤0 \leq celsius ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Convert the Temperature

Try to solve the Convert the Temperature problem.

Statement

You are given a non-negative floating-point number celsius representing a temperature in Celsius.

Convert celsius into Kelvin and Fahrenheit and return the result as an array [kelvin, fahrenheit].

The conversion formulas are:

  • Kelvin=\text{Kelvin} = celsius +273.15+ 273.15

  • Fahrenheit=\text{Fahrenheit} = celsius ×1.80+32.00\times 1.80 + 32.00

Constraints:

  • 0≤0 \leq celsius ≤1000\leq 1000