using System.Linq;
using System;
public class Solution {
public int[] solution(long n) {
string num = n.ToString();
int[] answer = new int[num.Length];
for(int i = 0; i < num.Length; i++)
{
answer[i] = int.Parse(num[i].ToString());
}
Array.Reverse(answer);
return answer;
}
}
'프로그래머스 > Lv.1' 카테고리의 다른 글
[프로그래머스 C#] 직사각형 별찍기 (0) | 2023.08.23 |
---|---|
[프로그래머스 C#] x만큼 간격이 있는 n개의 숫자 (0) | 2023.08.23 |
[프로그래머스 C#] 자릿수 더하기 (0) | 2023.08.22 |
[프로그래머스 C#] 문자열 다루기 기본 (0) | 2023.08.21 |
[프로그래머스 C#] 서울에서 김서방 찾기 (0) | 2023.08.20 |