package mission;
public class Pro_표현_가능한_이진트리 {
public static void main(String[] args) {
long[] numbers = {7L,42L,5L};
int[] result = solution(numbers);
for (int i : result) {
System.out.println("i = " + i);
}
}
static int[] solution(long[] numbers){
int[] answer = {};
for(int i = 0; i < numbers.length; i++){
String str = Long.toString(numbers[i], 2);
}
return answer;
}
}
'Algorithm > 프로그래머스' 카테고리의 다른 글
프로그래머스) 섬 연결하기 - 자바 (0) | 2024.08.05 |
---|---|
프로그래머스 게임 맵 최단거리 - 자바 (0) | 2024.08.05 |
프로그래머스 - 네트워크 (BFS로 풀기) (0) | 2024.08.01 |
프로그래머스 순위 (0) | 2024.08.01 |
프로그래머스 - 베스트앨범 (0) | 2024.07.26 |