
나의 풀이
class Solution {
public int solution(String s) {
int answer = 0;
answer = Integer.parseInt(s);
return answer;
}
}
다른 풀이
class Solution {
public int solution(String s) {
int answer = 0;
answer = Integer.valueOf(s);
return answer;
}
}'알고리즘' 카테고리의 다른 글
| [프로그래머스] 정수 내림차순으로 배치하기(Java) * (0) | 2024.11.04 |
|---|---|
| [프로그래머스] 정수 제곱근 판별(Java) (0) | 2024.11.04 |
| [프로그래머스] 배열 두 배 만들기 (Java) (0) | 2024.11.01 |
| [프로그래머스] 자연수 뒤집어 배열로 만들기(Java) * (0) | 2024.11.01 |
| [프로그래머스] x만큼 간격이 있는 n개의 숫자(Java) (0) | 2024.10.31 |