We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0c1a8d commit c99dda7Copy full SHA for c99dda7
2 files changed
프로그래머스/1/12932. 자연수 뒤집어 배열로 만들기/README.md
@@ -1,10 +1,10 @@
1
# [level 1] 자연수 뒤집어 배열로 만들기 - 12932
2
3
-[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12932)
+[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12932?language=java)
4
5
### 성능 요약
6
7
-메모리: 10.3 MB, 시간: 0.03 ms
+메모리: 77 MB, 시간: 0.04 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2024년 06월 20일 12:53:48
+2026년 06월 22일 22:05:58
20
21
### 문제 설명
22
프로그래머스/1/12932. 자연수 뒤집어 배열로 만들기/자연수 뒤집어 배열로 만들기.java
@@ -0,0 +1,8 @@
+class Solution {
+ public int[] solution(long n) {
+ StringBuilder sb = new StringBuilder(String.valueOf(n)).reverse();
+ int[] ans = new int[sb.length()];
+ for (int i = 0; i < sb.length(); i++) ans[i] = sb.charAt(i) - '0';
+ return ans;
+ }
+}
0 commit comments