[24.05.09] 내일배움캠프 18일차 JAVA TIL - 프로그래머스 자연수 뒤집기
2024. 5. 9. 20:06ㆍT.I.L
오늘 한 일
- Web 강의 수강 - 심화강의
- 발표 준비
class Solution {
public int[] solution(long n) {
String str = n + "";
int len = str.length();
int[] answer = new int[len];
for(int i=0;i<len;i++){
answer[i] = Integer.parseInt(str.substring(len-1-i,len-i));
}
return answer;
}
}
'T.I.L' 카테고리의 다른 글
[24.05.13] 내일배움캠프 20일차 JAVA TIL - Spring (0) | 2024.05.13 |
---|---|
[24.05.10] 내일배움캠프 19일차 JAVA TIL - OOP (0) | 2024.05.10 |
[24.05.08] 내일배움캠프 17일차 JAVA TIL - 개인 공부 SWEA 1249 (0) | 2024.05.08 |
[24.05.07] 내일배움캠프 16일차 JAVA TIL - 객체지향 프로그래밍 (0) | 2024.05.07 |
[24.05.02] 내일배움캠프 15일차 JAVA TIL - 개인과제 피드백 (0) | 2024.05.07 |