Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- string
- 구현
- two pointers
- 코딩테스트
- hash table
- Matrix
- geometry
- Counting
- Method
- Math
- greedy
- Tree
- SQL
- Stack
- bit manipulation
- implement
- dynamic programming
- 파이썬
- 코테
- Binary Tree
- Binary Search
- 자바
- array
- database
- Class
- sorting
- simulation
- java
- Data Structure
- Number Theory
Archives
- Today
- Total
코린이의 소소한 공부노트
[LeetCode/Easy] 2469. Convert the Temperature 본문
1. Input
1) double celsius
2. Output
1) Celsius로 표현된 온도를 Kelvin온도와 Fahrenheit온도로 변환해서 차례대로 담은 배열은 반환
- Kelvin = Celsius + 273.15
- Fahrenheit = Celsius * 1.80 + 32.00
3. Constraint
1) 0 <= celsius <= 1000
2) 실제 답과의 오차범위는 10^(-5) 이하여야 한다.
4. Example
Input: celsius = 36.50 => Output: [309.65000,97.70000]
5. Code
1) 첫 코드(2023/05/04)
class Solution {
public double[] convertTemperature(double celsius) {
return new double[] {celsius+273.15, celsius*1.8+32};
}
}
'코딩테스트 풀이 > JAVA' 카테고리의 다른 글
[LeetCode/Easy] 2481. Minimum Cuts to Divide a Circle (0) | 2023.05.04 |
---|---|
[LeetCode/Easy] 2475. Number of Unequal Triplets in Array (0) | 2023.05.04 |
[LeetCode/Easy] 2465. Number of Distinct Averages (0) | 2023.05.04 |
[LeetCode/Easy] 2460. Apply Operations to an Array (0) | 2023.05.04 |
[LeetCode/Easy] 2455. Average Value of Even Numbers That Are Divisible by Three (0) | 2023.05.04 |