LeetCode solutions

2556. Convert the Temperature

My accepted Python solution to LeetCode problem 2556, Convert the Temperature, running in 0ms.

  • Difficulty: Easy
  • Python
  • Runtime 0ms
  • Memory 12.5MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 0ms, memory 12.5MB, accepted 2025-12-24.

python
class Solution(object):
    def convertTemperature(self, celsius):
        kelvin = celsius + 273.15
        fahrenheit = celsius * 1.80 + 32.00
        return [kelvin, fahrenheit]

Source