반응형
    
    
    
  https://leetcode.com/problems/convert-the-temperature/description/
Convert the Temperature - LeetCode
Can you solve this real interview question? Convert the Temperature - You are given a non-negative floating point number rounded to two decimal places celsius, that denotes the temperature in Celsius. You should convert Celsius into Kelvin and Fahrenheit a
leetcode.com

주어진 값을 수식에 맞게 변형 후 리턴하는 문제
class Solution {
    fun convertTemperature(celsius: Double): DoubleArray {
        val ans = DoubleArray(2)
        ans[0] = celsius + 273.15
        ans[1] = celsius * 1.80 + 32.00 
        return ans;
    }
}반응형
    
    
    
  'IT > 알고리즘' 카테고리의 다른 글
| 74] Leetcode 2574. Left and Right Sum Differences Kotlin (0) | 2023.04.06 | 
|---|---|
| 73] Leetcode 2011. Final Value of Variable After Performing OperationsEasy1.1K151 #Kotlin (0) | 2023.04.05 | 
| 70] Leetcode 1929. Concatenation of Array (0) | 2023.04.03 | 
| 69] 프로그래머스 제곱수 판별하기 Kotlin (1) | 2023.03.21 | 
| 68] 프로그래머스 세균 증식 Kotlin (0) | 2023.03.20 | 
 
										
									 
										
									 
										
									 
										
									
댓글