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 |
Tags
- ํ์ด์ฌ
- ์ค๋ผํด
- ๊น๋ฏธ๊ฒฝ
- ์ปดํจํฐ๊ณผํ
- ๋ผํ๋ผ์ค์๋ง๋
- ์๋ฐ
- ํ๋ก๊ทธ๋๋ฐ
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- ๋ง์ผ๋ด๊ฐ์ธ์์๋ค์์ฐ๋ค๋ฉด
- html
- K๋ฐฐํฐ๋ฆฌ๋ ๋ณผ๋ฃจ์
- K๋ฐฐํฐ๋ฆฌ
- ์ฅํธ์์ค
- Java
- ์ฑ
- ๋ ์
- ์๋ฐ์คํฌ๋ฆฝํธ
- ์นํผ๋ธ๋ฆฌ์ฑ
- JavaScript
- ์ํ
- ์ฝ๋ฉ
- css
- database
- ์นํ์ด์ง๋ง๋ค๊ธฐ
- ๊น๋ฏธ๊ฒฝ์๋งํ์์
- ComputerScience
- Python
- ๊นํ๋จ
- ๊ฐ๋ฐ
- ๋ฐ์ํ
Archives
- Today
- Total
JiYoung Dev ๐ฅ
[JAVA] long ํ์ ์์ String ํ์ ์ผ๋ก ๋ณํํ๊ธฐ ๋ณธ๋ฌธ
String.valueOf(N)
import java.util.*;
class Solution {
public int[] solution(long n) {
String s = String.valueOf(n);
int idx = s.length();
int[] answer = new int[idx];
for(int i = 0 ; i < idx ; i++){
answer[i] = (int)(n % 10);
n /= 10;
}
return answer;
}
}
'Question' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[JAVA] String์์ int๋ก ๋ณํ (0) | 2023.08.08 |
---|---|
[JAVA] ์ ๊ณฑ๊ทผ ๊ตฌํ๊ธฐ (Math) (0) | 2023.08.08 |
[Java] ๋ฌธ์์ด์์ ๋ฐฐ์ด๋ก ๋ณํํ๋ ๋ฐฉ๋ฒ (0) | 2023.07.28 |
[JAVA] ์คํธ๋ฆผ(Stream) (0) | 2023.07.27 |
[HTML] <form>ํ๊ทธ enctype ์์ฑ (0) | 2023.06.12 |