File tree 2 files changed +22
-0
lines changed 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * 2469. Convert the Temperature
3
+ * https://leetcode.com/problems/convert-the-temperature/
4
+ * Difficulty: Easy
5
+ *
6
+ * You are given a non-negative floating point number rounded to two decimal places celsius,
7
+ * that denotes the temperature in Celsius.
8
+ *
9
+ * You should convert Celsius into Kelvin and Fahrenheit and return it as an array
10
+ * ans = [kelvin, fahrenheit].
11
+ *
12
+ * Return the array ans. Answers within 10-5 of the actual answer will be accepted.
13
+ */
14
+
15
+ /**
16
+ * @param {number } celsius
17
+ * @return {number[] }
18
+ */
19
+ var convertTemperature = function ( celsius ) {
20
+ return [ celsius + 273.15 , celsius * 1.80 + 32 ] ;
21
+ } ;
Original file line number Diff line number Diff line change 299
299
2154|[ Keep Multiplying Found Values by Two] ( ./2154-keep-multiplying-found-values-by-two.js ) |Easy|
300
300
2244|[ Minimum Rounds to Complete All Tasks] ( ./2244-minimum-rounds-to-complete-all-tasks.js ) |Medium|
301
301
2427|[ Number of Common Factors] ( ./2427-number-of-common-factors.js ) |Easy|
302
+ 2469|[ Convert the Temperature] ( ./2469-convert-the-temperature.js ) |Easy|
302
303
303
304
## License
304
305
You can’t perform that action at this time.
0 commit comments